Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
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
10
extern
"C"
{
11
#endif
12
18
19
#include <stddef.h>
20
#include <
stdint.h
>
21
22
#include <
zephyr/device.h
>
23
#include <
zephyr/drivers/gpio.h
>
24
25
enum
mfd_npm2100_event
{
26
NPM2100_EVENT_SYS_DIETEMP_WARN
,
27
NPM2100_EVENT_SYS_SHIPHOLD_FALL
,
28
NPM2100_EVENT_SYS_SHIPHOLD_RISE
,
29
NPM2100_EVENT_SYS_PGRESET_FALL
,
30
NPM2100_EVENT_SYS_PGRESET_RISE
,
31
NPM2100_EVENT_SYS_TIMER_EXPIRY
,
32
NPM2100_EVENT_ADC_VBAT_READY
,
33
NPM2100_EVENT_ADC_DIETEMP_READY
,
34
NPM2100_EVENT_ADC_DROOP_DETECT
,
35
NPM2100_EVENT_ADC_VOUT_READY
,
36
NPM2100_EVENT_GPIO0_FALL
,
37
NPM2100_EVENT_GPIO0_RISE
,
38
NPM2100_EVENT_GPIO1_FALL
,
39
NPM2100_EVENT_GPIO1_RISE
,
40
NPM2100_EVENT_BOOST_VBAT_WARN
,
41
NPM2100_EVENT_BOOST_VOUT_MIN
,
42
NPM2100_EVENT_BOOST_VOUT_WARN
,
43
NPM2100_EVENT_BOOST_VOUT_DPS
,
44
NPM2100_EVENT_BOOST_VOUT_OK
,
45
NPM2100_EVENT_LDOSW_OCP
,
46
NPM2100_EVENT_LDOSW_VINTFAIL
,
47
NPM2100_EVENT_MAX
48
};
49
50
enum
mfd_npm2100_timer_mode
{
51
NPM2100_TIMER_MODE_GENERAL_PURPOSE
,
52
NPM2100_TIMER_MODE_WDT_RESET
,
53
NPM2100_TIMER_MODE_WDT_POWER_CYCLE
,
54
NPM2100_TIMER_MODE_WAKEUP
,
55
};
56
69
int
mfd_npm2100_set_timer
(
const
struct
device
*dev,
uint32_t
time_ms,
70
enum
mfd_npm2100_timer_mode
mode);
71
78
int
mfd_npm2100_start_timer
(
const
struct
device
*dev);
79
86
int
mfd_npm2100_reset
(
const
struct
device
*dev);
87
102
int
mfd_npm2100_hibernate
(
const
struct
device
*dev,
uint32_t
time_ms,
bool
pass_through);
103
111
int
mfd_npm2100_add_callback
(
const
struct
device
*dev,
struct
gpio_callback
*callback);
112
120
int
mfd_npm2100_remove_callback
(
const
struct
device
*dev,
struct
gpio_callback
*callback);
121
123
124
#ifdef __cplusplus
125
}
126
#endif
127
128
#endif
/* ZEPHYR_INCLUDE_DRIVERS_MFD_NPM2100_H_ */
device.h
gpio.h
Main header file for GPIO driver API.
mfd_npm2100_start_timer
int mfd_npm2100_start_timer(const struct device *dev)
Start npm2100 timer.
mfd_npm2100_add_callback
int mfd_npm2100_add_callback(const struct device *dev, struct gpio_callback *callback)
Add npm2100 event callback.
mfd_npm2100_remove_callback
int mfd_npm2100_remove_callback(const struct device *dev, struct gpio_callback *callback)
Remove npm2100 event callback.
mfd_npm2100_hibernate
int mfd_npm2100_hibernate(const struct device *dev, uint32_t time_ms, bool pass_through)
npm2100 hibernate
mfd_npm2100_timer_mode
mfd_npm2100_timer_mode
Definition
npm2100.h:50
mfd_npm2100_set_timer
int mfd_npm2100_set_timer(const struct device *dev, uint32_t time_ms, enum mfd_npm2100_timer_mode mode)
Write npm2100 timer register.
mfd_npm2100_reset
int mfd_npm2100_reset(const struct device *dev)
npm2100 full power reset
mfd_npm2100_event
mfd_npm2100_event
Definition
npm2100.h:25
NPM2100_TIMER_MODE_GENERAL_PURPOSE
@ NPM2100_TIMER_MODE_GENERAL_PURPOSE
Definition
npm2100.h:51
NPM2100_TIMER_MODE_WDT_POWER_CYCLE
@ NPM2100_TIMER_MODE_WDT_POWER_CYCLE
Definition
npm2100.h:53
NPM2100_TIMER_MODE_WAKEUP
@ NPM2100_TIMER_MODE_WAKEUP
Definition
npm2100.h:54
NPM2100_TIMER_MODE_WDT_RESET
@ NPM2100_TIMER_MODE_WDT_RESET
Definition
npm2100.h:52
NPM2100_EVENT_LDOSW_VINTFAIL
@ NPM2100_EVENT_LDOSW_VINTFAIL
Definition
npm2100.h:46
NPM2100_EVENT_SYS_PGRESET_RISE
@ NPM2100_EVENT_SYS_PGRESET_RISE
Definition
npm2100.h:30
NPM2100_EVENT_ADC_DROOP_DETECT
@ NPM2100_EVENT_ADC_DROOP_DETECT
Definition
npm2100.h:34
NPM2100_EVENT_SYS_TIMER_EXPIRY
@ NPM2100_EVENT_SYS_TIMER_EXPIRY
Definition
npm2100.h:31
NPM2100_EVENT_GPIO1_RISE
@ NPM2100_EVENT_GPIO1_RISE
Definition
npm2100.h:39
NPM2100_EVENT_ADC_VBAT_READY
@ NPM2100_EVENT_ADC_VBAT_READY
Definition
npm2100.h:32
NPM2100_EVENT_GPIO0_RISE
@ NPM2100_EVENT_GPIO0_RISE
Definition
npm2100.h:37
NPM2100_EVENT_ADC_DIETEMP_READY
@ NPM2100_EVENT_ADC_DIETEMP_READY
Definition
npm2100.h:33
NPM2100_EVENT_SYS_DIETEMP_WARN
@ NPM2100_EVENT_SYS_DIETEMP_WARN
Definition
npm2100.h:26
NPM2100_EVENT_SYS_SHIPHOLD_FALL
@ NPM2100_EVENT_SYS_SHIPHOLD_FALL
Definition
npm2100.h:27
NPM2100_EVENT_BOOST_VOUT_WARN
@ NPM2100_EVENT_BOOST_VOUT_WARN
Definition
npm2100.h:42
NPM2100_EVENT_GPIO0_FALL
@ NPM2100_EVENT_GPIO0_FALL
Definition
npm2100.h:36
NPM2100_EVENT_LDOSW_OCP
@ NPM2100_EVENT_LDOSW_OCP
Definition
npm2100.h:45
NPM2100_EVENT_GPIO1_FALL
@ NPM2100_EVENT_GPIO1_FALL
Definition
npm2100.h:38
NPM2100_EVENT_ADC_VOUT_READY
@ NPM2100_EVENT_ADC_VOUT_READY
Definition
npm2100.h:35
NPM2100_EVENT_BOOST_VOUT_OK
@ NPM2100_EVENT_BOOST_VOUT_OK
Definition
npm2100.h:44
NPM2100_EVENT_SYS_PGRESET_FALL
@ NPM2100_EVENT_SYS_PGRESET_FALL
Definition
npm2100.h:29
NPM2100_EVENT_MAX
@ NPM2100_EVENT_MAX
Definition
npm2100.h:47
NPM2100_EVENT_BOOST_VOUT_DPS
@ NPM2100_EVENT_BOOST_VOUT_DPS
Definition
npm2100.h:43
NPM2100_EVENT_BOOST_VBAT_WARN
@ NPM2100_EVENT_BOOST_VBAT_WARN
Definition
npm2100.h:40
NPM2100_EVENT_SYS_SHIPHOLD_RISE
@ NPM2100_EVENT_SYS_SHIPHOLD_RISE
Definition
npm2100.h:28
NPM2100_EVENT_BOOST_VOUT_MIN
@ NPM2100_EVENT_BOOST_VOUT_MIN
Definition
npm2100.h:41
stdint.h
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
device
Runtime device structure (in ROM) per driver instance.
Definition
device.h:513
gpio_callback
GPIO callback structure.
Definition
gpio.h:771
zephyr
drivers
mfd
npm2100.h
Generated on
for Zephyr API by
1.17.0