#include <modm/platform/rtc/rtc.hpp>
|
using | duration = std::chrono::milliseconds |
|
using | rep = duration::rep |
|
using | period = duration::period |
|
using | time_point = std::chrono::time_point< Rtc, duration > |
|
|
static time_point | now () noexcept |
| Reads the RTC atomically and converts it to a time_point.
|
|
static std::time_t | to_time_t (const time_point &t) noexcept |
| Consider using the optimized Rtc::time_t() function directly instead!
|
|
static time_point | from_time_t (std::time_t t) noexcept |
|
static std::time_t | time_t () |
| Reads the RTC and converts to seconds in an optimized way.
|
|
static struct timeval | timeval () |
| Reads the RTC and converts to struct timeval in an optimized way.
|
|
static modm::DateTime | dateTime () |
| Reads the RTC and returns the split up calendar and time values in an optimized way.
|
|
static void | setDateTime (const modm::DateTime &dt) |
| Sets the RTC time.
|
|
static void | enable () |
| Enable the RTC clock.
|
|
static bool | initialize (bool forced=false) |
|
static void | disable () |
| Disable the RTC clock.
|
|
static void | acknowledgeInterruptFlag () |
|
template<uint64_t available, uint64_t requested, percent_t tolerance> |
static void | assertBaudrateInTolerance () |
|
template<double available, double requested, percent_t tolerance> |
static void | assertDurationInTolerance () |
|
static void | configurePurpose () |
| configures a peripheral for a specific purpose
|
|
static bool | getInterruptFlag () |
| Read an interrupt flag.
|
|
static void | getParameter () |
| returns a parameter
|
|
static void | initialize () |
| initializes the peripheral, must be called before use.
|
|
static void | setParameter () |
| sets a parameter
|
|
|
template<class SystemClock > |
requires | requires { SystemClock::Rtc |
| Initialize the RTC clock.
|
|
|
static constexpr bool | is_steady = false |
| RTC time can be changed forward/backward at any time.
|
|
Real Time Clock (RTC) control for STM32 devices
- Author
- Niklas Hauser
-
Rasmus Kleist Hørlyck Sørensen
static void modm::PeripheralDriver::acknowledgeInterruptFlag |
( |
| ) |
|
|
inheritedstatic |
Acknowledge an interrupt flag.
We use acknowledge here, since it describes the intention rather than the actual implementation.
template<uint64_t available, uint64_t requested, percent_t tolerance>
static void modm::PeripheralDriver::assertBaudrateInTolerance |
( |
| ) |
|
|
inheritedinlinestatic |
Since baudrates are usually generated by prescaling a system clock, only several distinct values can be generated. This method checks if the user requested baudrate is within error tolerance of the system achievable baudrate.
The documentation for this class was generated from the following file: