diff options
Diffstat (limited to 'board-js2x/slof/rtc.fs')
-rw-r--r-- | board-js2x/slof/rtc.fs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/board-js2x/slof/rtc.fs b/board-js2x/slof/rtc.fs index 861b3f9..5d5dbc3 100644 --- a/board-js2x/slof/rtc.fs +++ b/board-js2x/slof/rtc.fs @@ -40,6 +40,10 @@ \ PC87417.pdf page 156 (chapter 8.3.15) - RTC Control Register C 00 0c rtc! +: bcd-to-bin ( bcd -- bin ) + dup f and swap 4 rshift a * + +; + \ read from the rtc and do the bcd-to-bin conversion : rtc-bin@ ( offset -- value ) rtc@ bcd-to-bin |