Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
 4.2.99
npm13xx.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_npm13xx_event_t {
  NPM13XX_EVENT_CHG_COMPLETED , NPM13XX_EVENT_CHG_ERROR , NPM13XX_EVENT_BATTERY_DETECTED , NPM13XX_EVENT_BATTERY_REMOVED ,
  NPM13XX_EVENT_SHIPHOLD_PRESS , NPM13XX_EVENT_SHIPHOLD_RELEASE , NPM13XX_EVENT_WATCHDOG_WARN , NPM13XX_EVENT_VBUS_DETECTED ,
  NPM13XX_EVENT_VBUS_REMOVED , NPM13XX_EVENT_GPIO0_EDGE , NPM13XX_EVENT_GPIO1_EDGE , NPM13XX_EVENT_GPIO2_EDGE ,
  NPM13XX_EVENT_GPIO3_EDGE , NPM13XX_EVENT_GPIO4_EDGE , NPM13XX_EVENT_MAX
}

Functions

int mfd_npm13xx_reg_read_burst (const struct device *dev, uint8_t base, uint8_t offset, void *data, size_t len)
 Read multiple registers from npm13xx.
int mfd_npm13xx_reg_read (const struct device *dev, uint8_t base, uint8_t offset, uint8_t *data)
 Read single register from npm13xx.
int mfd_npm13xx_reg_write (const struct device *dev, uint8_t base, uint8_t offset, uint8_t data)
 Write single register to npm13xx.
int mfd_npm13xx_reg_write2 (const struct device *dev, uint8_t base, uint8_t offset, uint8_t data1, uint8_t data2)
 Write two registers to npm13xx.
int mfd_npm13xx_reg_update (const struct device *dev, uint8_t base, uint8_t offset, uint8_t data, uint8_t mask)
 Update selected bits in npm13xx register.
int mfd_npm13xx_set_timer (const struct device *dev, uint32_t time_ms)
 Write npm13xx timer register.
int mfd_npm13xx_reset (const struct device *dev)
 npm13xx full power reset
int mfd_npm13xx_hibernate (const struct device *dev, uint32_t time_ms)
 npm13xx hibernate
int mfd_npm13xx_add_callback (const struct device *dev, struct gpio_callback *callback)
 Add npm13xx event callback.
int mfd_npm13xx_remove_callback (const struct device *dev, struct gpio_callback *callback)
 Remove npm13xx event callback.