Driver for the on-chip battery voltage and chip temperature sensor.
More...
|
static int | value (int type) |
| Returns a reading from the sensor. More...
|
|
static int | configure (int type, int enable) |
| Configuration function for the battery monitor sensor. More...
|
|
static int | status (int type) |
| Returns the status of the sensor. More...
|
|
Driver for the on-chip battery voltage and chip temperature sensor.
◆ configure()
static int configure |
( |
int |
type, |
|
|
int |
enable |
|
) |
| |
|
static |
Configuration function for the battery monitor sensor.
- Parameters
-
type | Activate, enable or disable the sensor. See below |
enable | If |
When type == SENSORS_HW_INIT we turn on the hardware When type == SENSORS_ACTIVE and enable==1 we enable the sensor When type == SENSORS_ACTIVE and enable==0 we disable the sensor
Definition at line 95 of file batmon-sensor.c.
◆ status()
static int status |
( |
int |
type | ) |
|
|
static |
Returns the status of the sensor.
- Parameters
-
type | SENSORS_ACTIVE or SENSORS_READY |
- Returns
- 1 if the sensor is enabled
Definition at line 123 of file batmon-sensor.c.
◆ value()
static int value |
( |
int |
type | ) |
|
|
static |
Returns a reading from the sensor.
- Parameters
-
type | BATMON_SENSOR_TYPE_TEMP or BATMON_SENSOR_TYPE_VOLT |
- Returns
- The value as returned by the respective CC26xxware function
Definition at line 68 of file batmon-sensor.c.