Skip to content

Instantly share code, notes, and snippets.

@electronut
Last active July 28, 2020 10:03
Show Gist options
  • Save electronut/89177095e6ae404a70a103ff25ac6051 to your computer and use it in GitHub Desktop.
Save electronut/89177095e6ae404a70a103ff25ac6051 to your computer and use it in GitHub Desktop.
Bluey Beacon Main loop
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();
}
}
@polashmisra
Copy link

Can I find the definition of application_timers_start();
I am unable to go to beacon_timeout_handler() function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment