Skip to content

Commit f7ab595

Browse files
committed
Merge pull request #56 from ketile/More-fixes-for-Issue-#14
More fixes for issue #14 and eeprom error on MAC
2 parents 960adf7 + fb537f6 commit f7ab595

File tree

21 files changed

+46
-34
lines changed

21 files changed

+46
-34
lines changed

libraries/BLE/examples/ble_ANCS_template/ble_ANCS_template.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ However this removes the need to do the setup of the nRF8001 on every reset.
8585
#endif
8686

8787
/* Store the setup for the nRF8001 in the flash of the AVR to save on RAM */
88-
static hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
88+
static const hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
8989

9090
// aci_struct that will contain
9191
// total initial credits
@@ -692,7 +692,7 @@ void setup(void)
692692
aci_state.aci_setup_info.services_pipe_type_mapping = NULL;
693693
}
694694
aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES;
695-
aci_state.aci_setup_info.setup_msgs = setup_msgs;
695+
aci_state.aci_setup_info.setup_msgs = (hal_aci_data_t*) setup_msgs;
696696
aci_state.aci_setup_info.num_setup_msgs = NB_SETUP_MESSAGES;
697697

698698
//Tell the ACI library, the MCU to nRF8001 pin connections

libraries/BLE/examples/ble_A_Hello_World_Program/ble_A_Hello_World_Program.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ The following instructions describe the steps to be made on the Windows PC:
6060
*
6161
*/
6262
#include <SPI.h>
63+
#include <EEPROM.h>
6364
#include <lib_aci.h>
6465
#include <aci_setup.h>
6566
#include "uart_over_ble.h"

libraries/BLE/examples/ble_HID_keyboard_2_bonds_template/ble_HID_keyboard_2_bonds_template.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The setup() and the loop() functions are the equvivlent of main() .
7171
static services_pipe_type_mapping_t * services_pipe_type_mapping = NULL;
7272
#endif
7373

74-
static hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
74+
static const hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
7575

7676
#define BYTES_PER_BOND_IN_HEADER 2
7777
#define BONDS_MAX 2
@@ -792,7 +792,7 @@ void setup(void)
792792
aci_state.aci_setup_info.services_pipe_type_mapping = NULL;
793793
}
794794
aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES;
795-
aci_state.aci_setup_info.setup_msgs = setup_msgs;
795+
aci_state.aci_setup_info.setup_msgs = (hal_aci_data_t*) setup_msgs;
796796
aci_state.aci_setup_info.num_setup_msgs = NB_SETUP_MESSAGES;
797797

798798
/*

libraries/BLE/examples/ble_HID_keyboard_template/ble_HID_keyboard_template.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The setup() and the loop() functions are the equvivlent of main() .
6767
static services_pipe_type_mapping_t * services_pipe_type_mapping = NULL;
6868
#endif
6969

70-
static hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
70+
static const hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
7171

7272
// aci_struct that will contain
7373
// total initial credits
@@ -702,7 +702,7 @@ void setup(void)
702702
}
703703

704704
aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES;
705-
aci_state.aci_setup_info.setup_msgs = setup_msgs;
705+
aci_state.aci_setup_info.setup_msgs = (hal_aci_data_t*) setup_msgs;
706706
aci_state.aci_setup_info.num_setup_msgs = NB_SETUP_MESSAGES;
707707

708708
//Tell the ACI library, the MCU to nRF8001 pin connections

libraries/BLE/examples/ble_HID_template/ble_HID_template.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The setup() and the loop() functions are the equvivlent of main() .
7171
static services_pipe_type_mapping_t * services_pipe_type_mapping = NULL;
7272
#endif
7373

74-
static hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
74+
static const hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
7575

7676
// aci_struct that will contain
7777
// total initial credits
@@ -627,7 +627,7 @@ void setup(void)
627627
aci_state.aci_setup_info.services_pipe_type_mapping = NULL;
628628
}
629629
aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES;
630-
aci_state.aci_setup_info.setup_msgs = setup_msgs;
630+
aci_state.aci_setup_info.setup_msgs = (hal_aci_data_t*) setup_msgs;
631631
aci_state.aci_setup_info.num_setup_msgs = NB_SETUP_MESSAGES;
632632

633633
/*

libraries/BLE/examples/ble_HID_template_HID_HRM/ble_HID_template_HID_HRM.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ The setup() and the loop() functions are the equvivlent of
6969
static services_pipe_type_mapping_t * services_pipe_type_mapping = NULL;
7070
#endif
7171

72-
static hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
72+
static const hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
7373

7474
// aci_struct that will contain
7575
// total initial credits
@@ -614,7 +614,7 @@ void setup(void)
614614
aci_state.aci_setup_info.services_pipe_type_mapping = NULL;
615615
}
616616
aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES;
617-
aci_state.aci_setup_info.setup_msgs = setup_msgs;
617+
aci_state.aci_setup_info.setup_msgs = (hal_aci_data_t*) setup_msgs;
618618
aci_state.aci_setup_info.num_setup_msgs = NB_SETUP_MESSAGES;
619619

620620
/*

libraries/BLE/examples/ble_aci_transport_layer_verification/ble_aci_transport_layer_verification.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ received in the ACI echo event should be the same.
3838

3939
#define DEBUG_ENABLE CODED_TRACES
4040
#include <SPI.h>
41+
#include <EEPROM.h>
4142
#include <lib_aci.h>
4243

4344
// aci_struct that will contain

libraries/BLE/examples/ble_bandwidth_test/ble_bandwidth_test.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ The following instructions describe the steps to be made on the Windows PC:
5656
*
5757
*/
5858
#include <SPI.h>
59+
#include <EEPROM.h>
5960
#include <lib_aci.h>
6061
#include <aci_setup.h>
6162

@@ -83,7 +84,7 @@ Defining number of packets to send
8384
#endif
8485

8586
/* Store the setup for the nRF8001 in the flash of the AVR to save on RAM */
86-
static hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
87+
static const hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
8788

8889
// aci_struct that will contain
8990
// total initial credits
@@ -196,7 +197,7 @@ void setup(void)
196197
aci_state.aci_setup_info.services_pipe_type_mapping = NULL;
197198
}
198199
aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES;
199-
aci_state.aci_setup_info.setup_msgs = setup_msgs;
200+
aci_state.aci_setup_info.setup_msgs = (hal_aci_data_t*)setup_msgs;
200201
aci_state.aci_setup_info.num_setup_msgs = NB_SETUP_MESSAGES;
201202

202203
/*

libraries/BLE/examples/ble_broadcast/ble_broadcast.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The following instructions describe the steps to be made on the Windows PC:
4040
4141
*/
4242
#include <SPI.h>
43+
#include <EEPROM.h>
4344
#include <lib_aci.h>
4445
#include <aci_setup.h>
4546

@@ -61,7 +62,7 @@ However this removes the need to do the setup of the nRF8001 on every reset.
6162
#define NUMBER_OF_PIPES 0
6263
static services_pipe_type_mapping_t * services_pipe_type_mapping = NULL;
6364
#endif
64-
static hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
65+
static const hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
6566

6667
// aci_struct that will contain
6768
// total initial credits
@@ -112,7 +113,7 @@ void setup(void)
112113
aci_state.aci_setup_info.services_pipe_type_mapping = NULL;
113114
}
114115
aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES;
115-
aci_state.aci_setup_info.setup_msgs = setup_msgs;
116+
aci_state.aci_setup_info.setup_msgs = (hal_aci_data_t*) setup_msgs;
116117
aci_state.aci_setup_info.num_setup_msgs = NB_SETUP_MESSAGES;
117118

118119
/*

libraries/BLE/examples/ble_heart_rate_template/ble_heart_rate_template.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
*
3737
*/
3838
#include <SPI.h>
39+
#include <EEPROM.h>
3940
#include <lib_aci.h>
4041
#include <aci_setup.h>
4142
#include "services.h"
@@ -53,7 +54,7 @@
5354
Store the nRF8001 setup information generated on the flash of the AVR.
5455
This reduces the RAM requirements for the nRF8001.
5556
*/
56-
static hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
57+
static const hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT;
5758
// an aci_struct that will contain
5859
// total initial credits
5960
// current credit
@@ -110,7 +111,7 @@ void setup(void)
110111
aci_state.aci_setup_info.services_pipe_type_mapping = NULL;
111112
}
112113
aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES;
113-
aci_state.aci_setup_info.setup_msgs = setup_msgs;
114+
aci_state.aci_setup_info.setup_msgs = (hal_aci_data_t*)setup_msgs;
114115
aci_state.aci_setup_info.num_setup_msgs = NB_SETUP_MESSAGES;
115116

116117
/*

0 commit comments

Comments
 (0)