kinetis: Refactor RTC into RTT, add RTC wrapper.#2406
kinetis: Refactor RTC into RTT, add RTC wrapper.#2406jnohlgard merged 1 commit intoRIOT-OS:masterfrom
Conversation
|
Greatness! Just "ported" it to stm32f1 and works out of the box. I can open a PR against yours or do it separately. |
|
@thomaseichinger since the two changes are not really dependent on each other you might as well just open a separate PR for the STM32F1. |
cpu/kinetis_common/rtt.c
Outdated
There was a problem hiding this comment.
Where does this come from? I can't find it anywhere...
There was a problem hiding this comment.
It is supposed to be defined in periph_conf.h for the board. The purpose is to activate the module clock gate.
|
Code looks good to me and the wrapper is tested on other platforms too. |
|
Updated addressing comments by @thomaseichinger :
|
|
Travis is happy except for squashing. Squash & go? |
|
ACK, squash & go. |
206e553 to
a745c01
Compare
|
squashed, rebased on latest master, will merge as soon as Travis goes green. (the rebase made the PR jump ahead about 130 commits, which is why I wait for the CI) |
|
I realized waiting for Travis is pretty dumb since none of the kinetis_common utilizing platforms have been merged yet. Go! |
kinetis: Refactor RTC into RTT, add RTC wrapper.
This is a refactor of the RTC module in kinetis_common which is closer to the actual CPU hardware. The Kinetis RTC module is what RIOT refers to as an RTT (a second counter). Added is also an RTC wrapper layer which could be used by any other platform without RTC implementation, but with a working RTT implementation (STM32F1 for example).
Question: How do I integrate a generic RTC implementation for platforms with RTT but without RTC into the current RIOT structure?
Should I add some check for
FEATURES=(periph_rtt and not periph_rtc)in some Makefile in the drivers directory?