update board.c and radio.c
@@ -43,21 +43,20 @@ static void button_init(void);
extern int mote_main(void);
-int main(void)
-{
+int main(void) {
return mote_main();
}
//=========================== public ==========================================
-void board_init(void)
-{
+void board_init(void) {
+
// start low-frequency clock (LFCLK)
nrf_drv_clock_init();
NRF_CLOCK->EVENTS_LFCLKSTARTED= 0; ///< part of workaround for 3.1 [20] RTC: Register values are invalid from http://infocenter.nordicsemi.com/pdf/nRF52840_Rev_1_Errata_v1.1.pdf
nrf_drv_clock_lfclk_request(NULL);
- while (!nrf_drv_clock_lfclk_is_running()) { }
+ while (!nrf_drv_clock_lfclk_is_running());
NRF_RTC0->TASKS_STOP= 0; ///< part of workaround for 3.1 [20] RTC: Register values are invalid from http://infocenter.nordicsemi.com/pdf/nRF52840_Rev_1_Errata_v1.1.pdf
nrfx_systick_init();
@@ -96,8 +95,7 @@ void board_init(void)
/**
* Puts the board to sleep
*/
-void board_sleep(void)
-{
+void board_sleep(void) {
nrf_pwr_mgmt_run();
/*
@@ -118,8 +116,7 @@ void board_sleep(void)
/**
* Resets the board
*/
-void board_reset(void)
-{
+void board_reset(void) {
NVIC_SystemReset();
}
