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 PLATFORM_REGISTERS_H
7#define PLATFORM_REGISTERS_H
8
9#include <cstdint>
10
11namespace lampda {
12namespace platform {
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
59extern void go_to_sleep(const int wakeUpPin);
60
61} // namespace registers
62} // namespace platform
63} // namespace lampda
64
65#endif
bool is_voltage_detected_on_vbus()
voltage is detected on VBUS line
Definition: registers.cpp:82
uint8_t get_wire_interface_count()
get the number of wire com interfaces
Definition: registers.cpp:78
void enter_serial_dfu()
enter the dfu program mode
Definition: registers.cpp:80
bool is_started_from_reset()
microcontroler restarted after a reset
Definition: registers.cpp:94
void setup_adc(const uint8_t resolution)
setup the ADC
Definition: registers.cpp:72
void kick_watchdog(const uint8_t registerId)
Notify the software watchedog that we are alive.
Definition: registers.cpp:60
void setup_watchdog(const uint32_t timeoutDelaySecond)
Setup the software watchedog.
Definition: registers.cpp:47
bool is_started_from_watchdog()
reset after a watchdog timeout
Definition: registers.cpp:96
void go_to_sleep(const int wakeUpPin)
Put the system to sleep, with a wake up pin.
Definition: registers.cpp:108
float read_CPU_temperature_degreesC()
make a read of the CPU temp
Definition: registers.cpp:100
bool is_started_from_interrupt()
started by user interrupt
Definition: registers.cpp:98
uint64_t get_device_serial_number()
get serial number
Definition: registers.cpp:66
Program scope.
Definition: control_fixed_modes.hpp:12