1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

netopt: add NETOPT_BATMON

Many radios have a built-in battery monitor.
Add a netopt to configure it.
This commit is contained in:
Benjamin Valentin 2020-11-12 23:15:29 +01:00
parent 7e069290a0
commit f9c36f9738
3 changed files with 13 additions and 0 deletions

View File

@ -767,6 +767,16 @@ typedef enum {
*/
NETOPT_RSSI,
/**
* @brief (uint16_t) Set the battery monitor voltage (in mV).
*
* When set, a @ref SYS_BUS_POWER_EVENT_LOW_VOLTAGE event is generated
* on the SYS_BUS_POWER bus if the supply voltage falls below the set value.
*
* Set to 0 to disable battery monitoring.
*/
NETOPT_BATMON,
/**
* @brief (array of byte array) get link layer multicast groups as array
* of byte arrays (length of each byte array corresponds to the

View File

@ -126,6 +126,7 @@ static const char *_netopt_strmap[] = {
[NETOPT_NUM_GATEWAYS] = "NETOPT_NUM_GATEWAYS",
[NETOPT_LINK_CHECK] = "NETOPT_LINK_CHECK",
[NETOPT_RSSI] = "NETOPT_RSSI",
[NETOPT_BATMON] = "NETOPT_BATMON",
[NETOPT_L2_GROUP] = "NETOPT_L2_GROUP",
[NETOPT_L2_GROUP_LEAVE] = "NETOPT_L2_GROUP_LEAVE",
[NETOPT_NUMOF] = "NETOPT_NUMOF",

View File

@ -43,8 +43,10 @@ BOARD_INSUFFICIENT_MEMORY := \
lsn50 \
maple-mini \
mega-xplained \
mcb2388 \
microbit \
microduino-corerf \
msba2 \
msb-430 \
msb-430h \
nrf51dk \