LoRa-BLE-Sensor
Loading...
Searching...
No Matches
Classes | Functions
sensor_pmic.h File Reference

This is a library to keep track of the PMIC and its configuration. More...

#include <zephyr/device.h>
#include <stdbool.h>
#include <stdint.h>
#include <zephyr/drivers/sensor.h>
Include dependency graph for sensor_pmic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pmic_sensor_status_t
 Structure for the PMIC sensor status. More...
 
struct  sensor_pmic_ops_t
 Structure containing function pointers for PMIC operations. More...
 

Functions

int sensor_pmic_init_with_ops (const sensor_pmic_ops_t *ops)
 Initialize the PMIC with custom operations.
 
int sensor_pmic_init (void)
 Initialize the PMIC, with default operations.
 
int sensor_pmic_led_on (void)
 Turn on the LED.
 
int sensor_pmic_led_off (void)
 Turn off the LED.
 
int sensor_pmic_status_get (pmic_sensor_status_t *status)
 Get the status of the PMIC sensors.
 

Detailed Description

This is a library to keep track of the PMIC and its configuration.

Author
Tyler Garcia
Version
0.1
Date
2025-06-16

Function Documentation

◆ sensor_pmic_init()

int sensor_pmic_init ( void  )

Initialize the PMIC, with default operations.

Returns
int 0 on success, negative error code on failure

◆ sensor_pmic_init_with_ops()

int sensor_pmic_init_with_ops ( const sensor_pmic_ops_t ops)

Initialize the PMIC with custom operations.

Parameters
opsPointer to operations structure. If NULL, default operations will be used
Returns
int 0 on success, negative error code on failure

◆ sensor_pmic_led_off()

int sensor_pmic_led_off ( void  )

Turn off the LED.

Returns
int 0 on success, negative error code on failure

◆ sensor_pmic_led_on()

int sensor_pmic_led_on ( void  )

Turn on the LED.

Returns
int 0 on success, negative error code on failure

◆ sensor_pmic_status_get()

int sensor_pmic_status_get ( pmic_sensor_status_t status)

Get the status of the PMIC sensors.

Parameters
statusPointer to the status structure
Returns
int 0 on success, negative error code on failure