Skip to content

Commit 8c79cb6

Browse files
committed
fix main
1 parent 132e2de commit 8c79cb6

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

apps/firmware/src/main.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,24 @@ static char public_key[28] = {0x60, 0x52, 0x77, 0xfe, 0xdc, 0x80, 0xb1, 0x64,
6969
0x57, 0x3, 0x1, 0x9f};
7070
*/
7171

72+
/**@brief The handler of the config timer
73+
*
74+
* @details this function will be called when the timer timeouts
75+
*/
76+
static void config_timer_handler(void * p_context)
77+
{
78+
// Variable to hold the data to advertise
79+
uint8_t *ble_address;
80+
uint8_t *raw_data;
81+
uint8_t data_len;
82+
83+
// Set key to be advertised
84+
data_len = setAdvertisementKey(public_key, &ble_address, &raw_data);
85+
86+
// Update advertisement
87+
updateAdvertisementData(raw_data, data_len);
88+
}
89+
7290
/**@brief Function for the Timer initialization.
7391
*
7492
* @details Initializes the timer module. This creates and starts application timers.
@@ -88,24 +106,6 @@ static void timers_init(void)
88106

89107
}
90108

91-
/**@brief The handler of the config timer
92-
*
93-
* @details this function will be called when the timer timeouts
94-
*/
95-
static void config_timer_handler(void * p_context)
96-
{
97-
// Variable to hold the data to advertise
98-
uint8_t *ble_address;
99-
uint8_t *raw_data;
100-
uint8_t data_len;
101-
102-
// Set key to be advertised
103-
data_len = setAdvertisementKey(public_key, &ble_address, &raw_data);
104-
105-
// Update advertisement
106-
updateAdvertisementData(raw_data, data_len);
107-
}
108-
109109
/**@brief Function to start the timers
110110
*
111111
*/

0 commit comments

Comments
 (0)