-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clock] Refactor modules and add user-defined literals
This refactors the `:platform:clock` and related modules to remove legacy code and simplify module partitioning and adds user-defined literals for baudrate, bitrate and frequency. Structural changes (breaking): - Renamed `:platform:clock.cortex` -> `:platform:systick`. Moved `modm_clock.cpp` to `:platform:cortex-m` module - Moved `modm::platform::ClockControl` for STM32 to `:platform:rcc` module. - `modm:platform:clock` now is a module that contains common code. - moved flash wait-state tables into modm-devices. Refactoring (breaking): - Renamed `modm::platform::ClockControl` -> `modm::platform::Rcc`. - Renamed `modm::cortex::SysTickTimer` -> `modm::platform::SysTickTimer`. - Refactored `ClockControl::setFlashLatency(Hz, mV)` -> `ClockControl::setFlashLatency<Hz, mV>()`. Allows latency table lookup in constexpr at compile-time. - Added `Rcc::updateCoreFrequency<Hz>()`: Sets the internal frequency values for delay functions. User-defined literals (breaking) added to the `modm::literals` namespace: - Added `_Hz`, `_kHz` and `_MHz` literals. Removed and replaced usage of `modm::clock::Frequency` enum. - Added `_Bd`, `_kBd` and `_MBd` literals. Removed and replaced usage of `modm::Uart::Baudrate` enum. - Added `_bps`, _kbps` and `_Mbps` literals. Not used yet. All literals are simply casting to a dimensionless `uint32_t` of integer units to be lightweight and backwards compatible with modm.
- Loading branch information
Showing
164 changed files
with
1,058 additions
and
1,234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.