Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Functions
lampda::platform::registers Namespace Reference

Define the interaction layer with the system specific registers. More...

Functions

nrf_wdt_rr_register_t registerId_to_register (const uint8_t registerId)
 
void setup_watchdog (const uint32_t timeoutDelaySecond)
 Setup the software watchedog.
 
void kick_watchdog (const uint8_t registerId)
 Notify the software watchedog that we are alive.
 
uint64_t get_device_serial_number ()
 get serial number
 
void setup_adc (const uint8_t resolution)
 setup the ADC
 
uint8_t get_wire_interface_count ()
 get the number of wire com interfaces
 
void enter_serial_dfu ()
 enter the dfu program mode
 
bool is_voltage_detected_on_vbus ()
 voltage is detected on VBUS line
 
bool is_started_from_reset ()
 microcontroler restarted after a reset
 
bool is_started_from_watchdog ()
 reset after a watchdog timeout
 
bool is_started_from_interrupt ()
 started by user interrupt
 
float read_CPU_temperature_degreesC ()
 make a read of the CPU temp
 
void go_to_sleep (const int wakeUpPin)
 Put the system to sleep, with a wake up pin.
 

Detailed Description

Define the interaction layer with the system specific registers.

Function Documentation

◆ enter_serial_dfu()

void lampda::platform::registers::enter_serial_dfu ( )

enter the dfu program mode

Warning
Remove the whole program, will need to flash again

◆ go_to_sleep()

void lampda::platform::registers::go_to_sleep ( const int  wakeUpPin)

Put the system to sleep, with a wake up pin.

Parameters
[in]wakeUpPinPin id, defined by the system, that will be used to wake up again

◆ kick_watchdog()

void lampda::platform::registers::kick_watchdog ( const uint8_t  registerId)

Notify the software watchedog that we are alive.

Parameters
[in]registerIdWatchdog index to kick

◆ setup_adc()

void lampda::platform::registers::setup_adc ( const uint8_t  resolution)

setup the ADC

Parameters
[in]resolutionPower of 2 of the resolution (8, 10, 12 or 14).

◆ setup_watchdog()

void lampda::platform::registers::setup_watchdog ( const uint32_t  timeoutDelaySecond)

Setup the software watchedog.

Parameters
[in]timeoutDelaySecondDelay after which the watchdog will reset the whole system.