LoRa-BLE-Sensor
Loading...
Searching...
No Matches
Functions
sensor_pmic.c File Reference

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

#include "sensor_pmic.h"
#include <zephyr/logging/log.h>
#include <zephyr/drivers/led.h>
#include <zephyr/drivers/charger.h>
#include <zephyr/drivers/mfd/npm1300.h>
#include <zephyr/drivers/sensor/npm1300_charger.h>
Include dependency graph for sensor_pmic.c:

Functions

 LOG_MODULE_REGISTER (SENSOR_PMIC, LOG_LEVEL_INF)
 
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