nrfcxx  0.1.0
C++-17 Framework for Nordic nRF5 Devices
Data Structures | Public Member Functions | Static Public Attributes | Friends
nrfcxx::watchdog_extended_channel Class Reference

Support for extended watchdog channels. More...

#include <nrfcxx/core.hpp>

Public Member Functions

 watchdog_extended_channel (unsigned int interval_utt)
 Construct and register an extended watchdog with the specified interval.
 
void feed ()
 Feed the extended watchdog.
 
 watchdog_extended_channel (const watchdog_extended_channel &)=delete
 
watchdog_extended_channeloperator= (const watchdog_extended_channel &)=delete
 
 watchdog_extended_channel (watchdog_extended_channel &&)=delete
 
watchdog_extended_channeloperator= (watchdog_extended_channel &)=delete
 

Static Public Attributes

static constexpr uint8_t WATCHDOG_CHANNEL_COMMON = 7
 The underlying WDT channel used to support extended watchdog channels.
 

Friends

class systemState
 

Detailed Description

Support for extended watchdog channels.

In some applications there may be a need to confirm occurrence of events that have a long interval between occurrences; for example, a sensor that only reports every 5 minutes in a system that normally samples at 1 Hz. This class can be used to multiplex multiple watchdogs, each with its own interval, onto a single hardware watchdog channel.

Unlike dedicated watchdog channels new extended watchdog instances may be constructed after systemState::watchdogInit() is invoked (in fact, generally they should). For technical reasons the instances can also be destructed, which will remove them from the watchdog chain, but generally they should persist as long as the application is running.

The application must invoke systemState::watchdogCheckExtended() within the delay of the hardware watchdog to check that all extended channels are still conformant to their required intervals.


The documentation for this class was generated from the following file: