LoRaMac-node
LoRaMac-node copied to clipboard
Confusing comments in rtc-board.h
Comment for RtcGetTimerElapsedTime() says for retval "RTC Elapsed time since the last alarm in ticks" but in real it expects "RTC elapsed time since RtcSetTimerContext() call in ticks"
Comment for RtcGetCalendarTime() says for param milliseconds "Number of milliseconds elapsed since epoch" but in real it is "Number of millisecondse elapsed during current second/fractional milliseconds/subseconds". I cannost find the right wording asI I'm not native speaker. For say 1.532s from power on (epoch start) it should return 1 in retval and 532 in milliseconds param. The original comment lead to assuming that param milliseconds should be filled with number overflowing every ~1 minute.
It was very hard to get new port working due to these and several others unclear statements. SAMR34 port implementation is very useful place to look what it really should do. STM32 ports are full of MCU register magic. One should be able to implement things without guessing or without looking into implementation when the abstraction layer is clamed to be here.