Zephyr Project API 4.0.99
A Scalable Open Source RTOS
|
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. | |
enum mfd_npm2100_event |
#include <include/zephyr/drivers/mfd/npm2100.h>
#include <include/zephyr/drivers/mfd/npm2100.h>
Enumerator | |
---|---|
NPM2100_TIMER_MODE_GENERAL_PURPOSE | |
NPM2100_TIMER_MODE_WDT_RESET | |
NPM2100_TIMER_MODE_WDT_POWER_CYCLE | |
NPM2100_TIMER_MODE_WAKEUP |
int mfd_npm2100_add_callback | ( | const struct device * | dev, |
struct gpio_callback * | callback | ||
) |
#include <include/zephyr/drivers/mfd/npm2100.h>
Add npm2100 event callback.
dev | npm2100 mfd device |
callback | callback |
#include <include/zephyr/drivers/mfd/npm2100.h>
npm2100 hibernate
Enters low power state, and wakes after specified time or "shphld" pin signal.
dev | npm2100 mfd device |
time_ms | timer value in ms. Set to 0 to disable timer. |
0 | If successful |
-EINVAL | if time value is too large |
-EBUSY | if the timer is already in use. |
-errno | In case of any bus error (see i2c_write_dt()) |
int mfd_npm2100_remove_callback | ( | const struct device * | dev, |
struct gpio_callback * | callback | ||
) |
#include <include/zephyr/drivers/mfd/npm2100.h>
Remove npm2100 event callback.
dev | npm2100 mfd device |
callback | callback |
int mfd_npm2100_reset | ( | const struct device * | dev | ) |
#include <include/zephyr/drivers/mfd/npm2100.h>
npm2100 full power reset
dev | npm2100 mfd device |
0 | If successful |
-errno | In case of any bus error (see i2c_write_dt()) |
int mfd_npm2100_set_timer | ( | const struct device * | dev, |
uint32_t | time_ms, | ||
enum mfd_npm2100_timer_mode | mode | ||
) |
#include <include/zephyr/drivers/mfd/npm2100.h>
Write npm2100 timer register.
The timer tick resolution is 1/64 seconds. This function does not start the timer (see mfd_npm2100_start_timer()).
dev | npm2100 mfd device |
time_ms | timer value in ms |
mode | timer mode |
0 | If successful |
-EINVAL | if time value is too large |
-errno | In case of any bus error (see i2c_write_dt()) |
int mfd_npm2100_start_timer | ( | const struct device * | dev | ) |
#include <include/zephyr/drivers/mfd/npm2100.h>
Start npm2100 timer.
dev | npm2100 mfd device |
0 | If successful |
-errno | In case of any bus error (see i2c_write_dt()) |