nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
modem_battery.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef ZEPHYR_INCLUDE_MODEM_BATTERY_H_
8#define ZEPHYR_INCLUDE_MODEM_BATTERY_H_
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
31 POFWARN_3300 = 33
32};
33
40typedef void(*modem_battery_low_level_handler_t)(int battery_voltage);
41
51
56
68
89
98
108
118
135int modem_battery_low_level_set(int battery_level);
136
154int modem_battery_voltage_get(int *battery_voltage);
155
158#ifdef __cplusplus
159}
160#endif
161
162#endif /* ZEPHYR_INCLUDE_MODEM_BATTERY_H_ */
void(* modem_battery_low_level_handler_t)(int battery_voltage)
Type definition of event handler for battery voltage low level notifications.
Definition: modem_battery.h:40
int modem_battery_low_level_disable(void)
Unsubscribe unsolicited notifications of battery voltage low level.
pofwarn_level
Battery voltage levels for power-off warnings.
Definition: modem_battery.h:27
@ POFWARN_3000
Definition: modem_battery.h:28
@ POFWARN_3200
Definition: modem_battery.h:30
@ POFWARN_3300
Definition: modem_battery.h:31
@ POFWARN_3100
Definition: modem_battery.h:29
int modem_battery_voltage_get(int *battery_voltage)
Function for retrieving the latest voltage measured automatically during modem wakeup or reception....
int modem_battery_low_level_handler_set(modem_battery_low_level_handler_t handler)
Function to set an event handler for battery voltage low level notifications.
int modem_battery_pofwarn_handler_set(modem_battery_pofwarn_handler_t handler)
Function to set an event handler for power-off warnings.
int modem_battery_low_level_enable(void)
Subscribe unsolicited notifications of battery voltage low level.
int modem_battery_low_level_set(int battery_level)
Set the battery voltage low level for the modem.
int modem_battery_pofwarn_enable(enum pofwarn_level level)
Configure power-off warnings from the modem.
void(* modem_battery_pofwarn_handler_t)(void)
Type definition of Event handler for power-off warnings.
Definition: modem_battery.h:55
int modem_battery_pofwarn_disable(void)
Disable power-off warnings from the modem.