Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
npm2100.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>

Go to the source code of this file.

Enumerations

enum  mfd_npm2100_event {
  NPM2100_EVENT_SYS_DIETEMP_WARN , NPM2100_EVENT_SYS_SHIPHOLD_FALL , NPM2100_EVENT_SYS_SHIPHOLD_RISE , NPM2100_EVENT_SYS_PGRESET_FALL ,
  NPM2100_EVENT_SYS_PGRESET_RISE , NPM2100_EVENT_SYS_TIMER_EXPIRY , NPM2100_EVENT_ADC_VBAT_READY , NPM2100_EVENT_ADC_DIETEMP_READY ,
  NPM2100_EVENT_ADC_DROOP_DETECT , NPM2100_EVENT_ADC_VOUT_READY , NPM2100_EVENT_GPIO0_FALL , NPM2100_EVENT_GPIO0_RISE ,
  NPM2100_EVENT_GPIO1_FALL , NPM2100_EVENT_GPIO1_RISE , NPM2100_EVENT_BOOST_VBAT_WARN , NPM2100_EVENT_BOOST_VOUT_MIN ,
  NPM2100_EVENT_BOOST_VOUT_WARN , NPM2100_EVENT_BOOST_VOUT_DPS , NPM2100_EVENT_BOOST_VOUT_OK , NPM2100_EVENT_LDOSW_OCP ,
  NPM2100_EVENT_LDOSW_VINTFAIL , NPM2100_EVENT_MAX
}
 
enum  mfd_npm2100_timer_mode { NPM2100_TIMER_MODE_GENERAL_PURPOSE , NPM2100_TIMER_MODE_WDT_RESET , NPM2100_TIMER_MODE_WDT_POWER_CYCLE , NPM2100_TIMER_MODE_WAKEUP }
 

Functions

int mfd_npm2100_set_timer (const struct device *dev, uint32_t time_ms, enum mfd_npm2100_timer_mode mode)
 Write npm2100 timer register.
 
int mfd_npm2100_start_timer (const struct device *dev)
 Start npm2100 timer.
 
int mfd_npm2100_reset (const struct device *dev)
 npm2100 full power reset
 
int mfd_npm2100_hibernate (const struct device *dev, uint32_t time_ms)
 npm2100 hibernate
 
int mfd_npm2100_add_callback (const struct device *dev, struct gpio_callback *callback)
 Add npm2100 event callback.
 
int mfd_npm2100_remove_callback (const struct device *dev, struct gpio_callback *callback)
 Remove npm2100 event callback.