modm API documentation
modm::platform::Iwdg Class Reference
Inheritance diagram for modm::platform::Iwdg:
modm::PeripheralDriver

Public Types

enum  Prescaler : uint8_t {
  Div4 = 0, Div8 = IWDG_PR_PR_0, Div16 = IWDG_PR_PR_1, Div32 = IWDG_PR_PR_1 | IWDG_PR_PR_0,
  Div64 = IWDG_PR_PR_2, Div128 = IWDG_PR_PR_2 | IWDG_PR_PR_0, Div256 = IWDG_PR_PR_2 | IWDG_PR_PR_1, All = IWDG_PR_PR_2 | IWDG_PR_PR_1 | IWDG_PR_PR_0
}
 
enum  Status : uint8_t { None = 0, Prescaler = IWDG_SR_PVU, Reload = IWDG_SR_RVU, All = IWDG_SR_PVU | IWDG_SR_RVU }
 

Static Public Member Functions

static void initialize (Prescaler prescaler, uint16_t reload)
 
template<class SystemClock , milliseconds_t timeout, percent_t tolerance = pct(1)>
static void initialize ()
 
static void enable ()
 
static void trigger ()
 
static Status getStatus ()
 
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 setParameter ()
 sets a parameter
 

Member Function Documentation

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: