XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
gpio.h
浏览该文件的文档.
1
21#ifndef __xwcd_ds_iochip_gpio_h__
22#define __xwcd_ds_iochip_gpio_h__
23
24#include <xwcd/ds/standard.h>
25#include <xwcd/ds/iochip/chip.h>
26
32#define XWDS_IOCHIP_GPIO_PORT(p) (p)
33
34#define XWDS_IOCHIP_GPIO_PIN(n) (1U << ((xwu32_t)(n)))
35#define XWDS_IOCHIP_GPIO_PIN_MASK(n) (XWDS_IOCHIP_GPIO_PIN(n) - 1U)
36
73};
74
90 xwid_t port, xwsq_t pinmask,
91 xwtm_t to);
92
108 xwid_t port, xwsq_t pinmask,
109 xwtm_t to);
110
127 xwid_t port, xwsq_t pinmask, void * cfg,
128 xwtm_t to);
129
146 xwid_t port, xwsq_t pinmask,
147 xwtm_t to);
148
165 xwid_t port, xwsq_t pinmask,
166 xwtm_t to);
167
184 xwid_t port, xwsq_t pinmask,
185 xwtm_t to);
186
205 xwid_t port, xwsq_t pinmask, xwsq_t out,
206 xwtm_t to);
207
225 xwid_t port, xwsq_t pinmask, xwsq_t * inbuf,
226 xwtm_t to);
227
232#endif /* xwcd/ds/iochip/gpio.h */
xwer_t xwds_iochip_gpio_input(struct xwds_iochip *iochip, xwid_t port, xwsq_t pinmask, xwsq_t *inbuf, xwtm_t to)
XWDS API:并行读取多个IO扩展芯片的GPIO
Definition gpio.c:299
xwer_t xwds_iochip_gpio_set(struct xwds_iochip *iochip, xwid_t port, xwsq_t pinmask, xwtm_t to)
XWDS API:将IO扩展芯片的GPIO设置为高电平
Definition gpio.c:135
xwer_t xwds_iochip_gpio_cfg(struct xwds_iochip *iochip, xwid_t port, xwsq_t pinmask, void *cfg, xwtm_t to)
XWDS API:配置IO扩展芯片的GPIO
Definition gpio.c:100
xwer_t xwds_iochip_gpio_toggle(struct xwds_iochip *iochip, xwid_t port, xwsq_t pinmask, xwtm_t to)
XWDS API:翻转IO扩展芯片的GPIO电平
Definition gpio.c:217
xwer_t xwds_iochip_gpio_req(struct xwds_iochip *iochip, xwid_t port, xwsq_t pinmask, xwtm_t to)
XWDS API:申请IO扩展芯片的GPIO
Definition gpio.c:27
xwer_t xwds_iochip_gpio_reset(struct xwds_iochip *iochip, xwid_t port, xwsq_t pinmask, xwtm_t to)
XWDS API:将IO扩展芯片的GPIO设置为低电平
Definition gpio.c:176
#define XWDS_IOCHIP_GPIO_PIN(n)
Definition gpio.h:34
xwer_t xwds_iochip_gpio_rls(struct xwds_iochip *iochip, xwid_t port, xwsq_t pinmask, xwtm_t to)
XWDS API:释放IO扩展芯片的GPIO
Definition gpio.c:65
xwds_iochip_gpio_pin_em
XWDS IOCHIP GPIO PIN 枚举
Definition gpio.h:40
xwer_t xwds_iochip_gpio_output(struct xwds_iochip *iochip, xwid_t port, xwsq_t pinmask, xwsq_t out, xwtm_t to)
XWDS API:并行输出多个IO扩展芯片的GPIO
Definition gpio.c:258
xws64_t xwtm_t
XWOS系统时间 (有符号)
Definition type.h:742
signed long xwer_t
Definition type.h:554
unsigned long xwid_t
Definition type.h:481
unsigned long xwsq_t
Definition type.h:445
玄武设备栈:IO扩展芯片
@ XWDS_IOCHIP_GPIO_PIN_16
Definition gpio.h:57
@ XWDS_IOCHIP_GPIO_PIN_20
Definition gpio.h:61
@ XWDS_IOCHIP_GPIO_PIN_26
Definition gpio.h:67
@ XWDS_IOCHIP_GPIO_PIN_6
Definition gpio.h:47
@ XWDS_IOCHIP_GPIO_PIN_1
Definition gpio.h:42
@ XWDS_IOCHIP_GPIO_PIN_9
Definition gpio.h:50
@ XWDS_IOCHIP_GPIO_PIN_23
Definition gpio.h:64
@ XWDS_IOCHIP_GPIO_PIN_31
Definition gpio.h:72
@ XWDS_IOCHIP_GPIO_PIN_30
Definition gpio.h:71
@ XWDS_IOCHIP_GPIO_PIN_21
Definition gpio.h:62
@ XWDS_IOCHIP_GPIO_PIN_19
Definition gpio.h:60
@ XWDS_IOCHIP_GPIO_PIN_13
Definition gpio.h:54
@ XWDS_IOCHIP_GPIO_PIN_2
Definition gpio.h:43
@ XWDS_IOCHIP_GPIO_PIN_27
Definition gpio.h:68
@ XWDS_IOCHIP_GPIO_PIN_29
Definition gpio.h:70
@ XWDS_IOCHIP_GPIO_PIN_8
Definition gpio.h:49
@ XWDS_IOCHIP_GPIO_PIN_24
Definition gpio.h:65
@ XWDS_IOCHIP_GPIO_PIN_14
Definition gpio.h:55
@ XWDS_IOCHIP_GPIO_PIN_25
Definition gpio.h:66
@ XWDS_IOCHIP_GPIO_PIN_11
Definition gpio.h:52
@ XWDS_IOCHIP_GPIO_PIN_4
Definition gpio.h:45
@ XWDS_IOCHIP_GPIO_PIN_18
Definition gpio.h:59
@ XWDS_IOCHIP_GPIO_PIN_12
Definition gpio.h:53
@ XWDS_IOCHIP_GPIO_PIN_5
Definition gpio.h:46
@ XWDS_IOCHIP_GPIO_PIN_15
Definition gpio.h:56
@ XWDS_IOCHIP_GPIO_PIN_0
Definition gpio.h:41
@ XWDS_IOCHIP_GPIO_PIN_7
Definition gpio.h:48
@ XWDS_IOCHIP_GPIO_PIN_3
Definition gpio.h:44
@ XWDS_IOCHIP_GPIO_PIN_17
Definition gpio.h:58
@ XWDS_IOCHIP_GPIO_PIN_28
Definition gpio.h:69
@ XWDS_IOCHIP_GPIO_PIN_10
Definition gpio.h:51
@ XWDS_IOCHIP_GPIO_PIN_22
Definition gpio.h:63
IO扩展芯片
Definition chip.h:95
玄武设备栈:顶级头文件