void system_local_timing() { if(system_local_click == 100) { xprintf("the time is :%d\r\n ", get_system_time()); system_local_click = 0; //if(BL.E.OPEN_STATE == true) system_time_update(); } else system_local_click++; }
/**@sdfasfsgfsdgsdgsdgsdgfsdgfsdgsdgsdgsafdasfasfasfasfsdafsa >>>>>>>>>>>>>>>>>>>>>>>>>>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>/ * <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<#############################################<\\\\\\\\\\\\\\\\\<<<<<<<<<<<<<<< * >>>>>>>>>>>>>>>>>>>>>>>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%999999999999999999%%%%%%%%%%%>>>>>>>> **@brief Function for handling the RTC1 interrupt. * * @details Checks for timeouts, and executes timeout handlers for expired timers. */ void RTC1_IRQHandler(void) { if(BL.E.OPEN_STATE == false) system_time_update(); // Clear all events (also unexpected ones) NRF_RTC1->EVENTS_COMPARE[0] = 0; NRF_RTC1->EVENTS_COMPARE[1] = 0; NRF_RTC1->EVENTS_COMPARE[2] = 0; NRF_RTC1->EVENTS_COMPARE[3] = 0; NRF_RTC1->EVENTS_TICK = 0; NRF_RTC1->EVENTS_OVRFLW = 0; // Check for expired timers //timer_timeouts_check(); }
uint32_t mp_hal_ticks_ms(void) { // Compute milliseconds from 64-bit microsecond counter system_time_update(); return ((uint64_t)system_time_high_word << 32 | (uint64_t)system_time_low_word) / 1000; }