nRF Connect SDK API 0.1.0
|
int lwm2m_carrier_battery_level_set | ( | uint8_t | battery_level | ) |
#include <lib/bin/lwm2m_carrier/include/lwm2m_carrier.h>
Set the OMA LwM2M Device
object Battery Level
resource (/3/0/9).
LWM2M_CARRIER_POWER_SOURCE_INTERNAL_BATTERY needs to be enabled first using lwm2m_carrier_avail_power_sources_set().
[in] | battery_level | Internal battery level percentage (0-100). |
0 | If the battery level has been updated successfully. |
-EINVAL | If the specified battery level lies outside the 0-100% range. |
-ENODEV | If internal battery is not listed as an available power source. |