Hey Nice to see it
I was thinking of pulling the RTC in from the from the framework.
Code comment review.
There is a potential hiccup. When reading hardware registers and operating on them I always make one good local read/copy of the hardware register and then operate on the same value. So in
return (((current_time() & 0x00300000) >> 20) * 10 + ((current_time() & 0x000F0000) >> 16));
converting from BCD to std number the "current_time()" is called twice and each time reads from the hardware registers. With the two current_time() reads they could return different readings.
Better I would think to do
uint32_t dwTimeCurrent = current_time();
return (((dwTimeCurrent & 0x00300000) >> 20) * 10 + (( dwTimeCurrent & 0x000F0000) >> 16));