Last active
July 28, 2020 10:03
-
-
Save electronut/89177095e6ae404a70a103ff25ac6051 to your computer and use it in GitHub Desktop.
Bluey Beacon Main loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(void) | |
{ | |
uint32_t err_code; | |
APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false); | |
ble_stack_init(); | |
advertising_init(); | |
timers_init(); | |
advertising_start(); | |
application_timers_start(); | |
twi_init(); | |
HDC1010_init(TEMP_OR_HUMID); | |
APDS9301_init(); | |
// Enter main loop. | |
for (;; ) | |
{ | |
// one-shot flag to set adv data | |
if(g_setAdvData) { | |
set_adv_data(false); | |
g_setAdvData = false; | |
} | |
power_manage(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can I find the definition of application_timers_start();
I am unable to go to beacon_timeout_handler() function