Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
GpRegRet Class Reference

Class to write and read the GPREGRET. More...

#include <cs_GpRegRet.h>

Public Types

enum  GpRegRetFlag { FLAG_BROWNOUT = CS_GPREGRET_FLAG_BROWNOUT , FLAG_DFU = CS_GPREGRET_FLAG_DFU_RESET , FLAG_STORAGE_RECOVERED = CS_GPREGRET_FLAG_STORAGE_RECOVERED }
 
enum  GpRegRetId { GPREGRET = 0 , GPREGRET2 = 1 }
 

Static Public Member Functions

static uint32_t getValue (GpRegRetId registerId=GpRegRetId::GPREGRET)
 Get the GPREGRET value. More...
 
static void clearAll ()
 Clear all GPREGRET bits. More...
 
static void clearCounter ()
 Clear counter. More...
 
static uint32_t getCounter ()
 Get the current counter value. More...
 
static void setCounter (uint32_t value)
 Set counter to a given value. More...
 
static void clearFlags ()
 Clear all flags. More...
 
static void setFlag (GpRegRetFlag flag)
 Set a flag. More...
 
static void clearFlag (GpRegRetFlag flag)
 Clear a flag. More...
 
static bool isFlagSet (GpRegRetFlag flag)
 Returns true when flag is set. More...
 

Static Private Member Functions

static void printRegRet ()
 

Detailed Description

Class to write and read the GPREGRET.

Only to be used when SoftDevice is enabled.

See cs_GpRegRetConfig.h for more info.

Member Enumeration Documentation

◆ GpRegRetFlag

Enumerator
FLAG_BROWNOUT 
FLAG_DFU 
FLAG_STORAGE_RECOVERED 

◆ GpRegRetId

Enumerator
GPREGRET 
GPREGRET2 

Member Function Documentation

◆ clearAll()

static void GpRegRet::clearAll ( )
static

Clear all GPREGRET bits.

◆ clearCounter()

static void GpRegRet::clearCounter ( )
static

Clear counter.

◆ clearFlag()

static void GpRegRet::clearFlag ( GpRegRetFlag  flag)
static

Clear a flag.

◆ clearFlags()

static void GpRegRet::clearFlags ( )
static

Clear all flags.

◆ getCounter()

static uint32_t GpRegRet::getCounter ( )
static

Get the current counter value.

◆ getValue()

static uint32_t GpRegRet::getValue ( GpRegRetId  registerId = GpRegRetId::GPREGRET)
static

Get the GPREGRET value.

Parameters
[in]registerId

◆ isFlagSet()

static bool GpRegRet::isFlagSet ( GpRegRetFlag  flag)
static

Returns true when flag is set.

◆ printRegRet()

static void GpRegRet::printRegRet ( )
staticprivate

◆ setCounter()

static void GpRegRet::setCounter ( uint32_t  value)
static

Set counter to a given value.

◆ setFlag()

static void GpRegRet::setFlag ( GpRegRetFlag  flag)
static

Set a flag.


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