Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
registers.h
Go to the documentation of this file.
1
5// do not use pragma once here, has this can be mocked
6#ifndef HAL_REGISTERS_H
7#define HAL_REGISTERS_H
8
9#include <cstdint>
10
11namespace lampda {
12namespace hal {
14namespace registers {
15
20extern void setup_watchdog(const uint32_t timeoutDelaySecond);
21
26extern void kick_watchdog(const uint8_t registerId);
27
29extern uint64_t get_device_serial_number();
30
33extern void setup_adc(const uint8_t resolution);
34
36extern uint8_t get_wire_interface_count();
37
40extern void enter_serial_dfu();
41
43extern bool is_voltage_detected_on_vbus();
44
46extern bool is_started_from_reset();
48extern bool is_started_from_watchdog();
50extern bool is_started_from_interrupt();
51
54
60extern void go_to_sleep(const int wakeUpPin, const bool wakeUpOnRelease);
61
63extern void sync_memory_protection();
64
65} // namespace registers
66} // namespace hal
67} // namespace lampda
68
69#endif
uint8_t get_wire_interface_count()
get the number of wire com interfaces
Definition: registers.cpp:82
void setup_watchdog(const uint32_t timeoutDelaySecond)
Setup the software watchedog.
Definition: registers.cpp:51
bool is_started_from_watchdog()
reset after a watchdog timeout
Definition: registers.cpp:106
bool is_voltage_detected_on_vbus()
voltage is detected on VBUS line
Definition: registers.cpp:92
float read_CPU_temperature_degreesC()
make a read of the CPU temp
Definition: registers.cpp:110
void setup_adc(const uint8_t resolution)
setup the ADC
Definition: registers.cpp:76
bool is_started_from_reset()
microcontroler restarted after a reset
Definition: registers.cpp:104
bool is_started_from_interrupt()
started by user interrupt
Definition: registers.cpp:108
uint64_t get_device_serial_number()
get serial number
Definition: registers.cpp:70
void enter_serial_dfu()
enter the dfu program mode
Definition: registers.cpp:84
void sync_memory_protection()
SRAM RAM write protection.
Definition: registers.cpp:146
void kick_watchdog(const uint8_t registerId)
Notify the software watchedog that we are alive.
Definition: registers.cpp:64
void go_to_sleep(const int wakeUpPin, const bool wakeUpOnRelease)
Put the system to sleep, with a wake up pin.
Definition: registers.cpp:118
Program scope.
Definition: control_fixed_modes.hpp:12