Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
npm2100.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#ifndef ZEPHYR_INCLUDE_DRIVERS_MFD_NPM2100_H_
7#define ZEPHYR_INCLUDE_DRIVERS_MFD_NPM2100_H_
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
19#include <stddef.h>
20#include <stdint.h>
21
22#include <zephyr/device.h>
23#include <zephyr/drivers/gpio.h>
24
49
56
70int mfd_npm2100_set_timer(const struct device *dev, uint32_t time_ms,
71 enum mfd_npm2100_timer_mode mode);
72
80int mfd_npm2100_start_timer(const struct device *dev);
81
89int mfd_npm2100_reset(const struct device *dev);
90
103int mfd_npm2100_hibernate(const struct device *dev, uint32_t time_ms);
104
112int mfd_npm2100_add_callback(const struct device *dev, struct gpio_callback *callback);
113
121int mfd_npm2100_remove_callback(const struct device *dev, struct gpio_callback *callback);
122
125#ifdef __cplusplus
126}
127#endif
128
129#endif /* ZEPHYR_INCLUDE_DRIVERS_MFD_NPM2100_H_ */
Public APIs for GPIO drivers.
int mfd_npm2100_start_timer(const struct device *dev)
Start npm2100 timer.
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.
mfd_npm2100_timer_mode
Definition npm2100.h:50
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_reset(const struct device *dev)
npm2100 full power reset
mfd_npm2100_event
Definition npm2100.h:25
int mfd_npm2100_hibernate(const struct device *dev, uint32_t time_ms)
npm2100 hibernate
@ NPM2100_TIMER_MODE_GENERAL_PURPOSE
Definition npm2100.h:51
@ NPM2100_TIMER_MODE_WDT_POWER_CYCLE
Definition npm2100.h:53
@ NPM2100_TIMER_MODE_WAKEUP
Definition npm2100.h:54
@ NPM2100_TIMER_MODE_WDT_RESET
Definition npm2100.h:52
@ NPM2100_EVENT_LDOSW_VINTFAIL
Definition npm2100.h:46
@ NPM2100_EVENT_SYS_PGRESET_RISE
Definition npm2100.h:30
@ NPM2100_EVENT_ADC_DROOP_DETECT
Definition npm2100.h:34
@ NPM2100_EVENT_SYS_TIMER_EXPIRY
Definition npm2100.h:31
@ NPM2100_EVENT_GPIO1_RISE
Definition npm2100.h:39
@ NPM2100_EVENT_ADC_VBAT_READY
Definition npm2100.h:32
@ NPM2100_EVENT_GPIO0_RISE
Definition npm2100.h:37
@ NPM2100_EVENT_ADC_DIETEMP_READY
Definition npm2100.h:33
@ NPM2100_EVENT_SYS_DIETEMP_WARN
Definition npm2100.h:26
@ NPM2100_EVENT_SYS_SHIPHOLD_FALL
Definition npm2100.h:27
@ NPM2100_EVENT_BOOST_VOUT_WARN
Definition npm2100.h:42
@ NPM2100_EVENT_GPIO0_FALL
Definition npm2100.h:36
@ NPM2100_EVENT_LDOSW_OCP
Definition npm2100.h:45
@ NPM2100_EVENT_GPIO1_FALL
Definition npm2100.h:38
@ NPM2100_EVENT_ADC_VOUT_READY
Definition npm2100.h:35
@ NPM2100_EVENT_BOOST_VOUT_OK
Definition npm2100.h:44
@ NPM2100_EVENT_SYS_PGRESET_FALL
Definition npm2100.h:29
@ NPM2100_EVENT_MAX
Definition npm2100.h:47
@ NPM2100_EVENT_BOOST_VOUT_DPS
Definition npm2100.h:43
@ NPM2100_EVENT_BOOST_VBAT_WARN
Definition npm2100.h:40
@ NPM2100_EVENT_SYS_SHIPHOLD_RISE
Definition npm2100.h:28
@ NPM2100_EVENT_BOOST_VOUT_MIN
Definition npm2100.h:41
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Runtime device structure (in ROM) per driver instance.
Definition device.h:412
GPIO callback structure.
Definition gpio.h:741