XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
gpio.h
浏览该文件的文档.
1
21#ifndef __xwcd_ds_soc_gpio_h__
22#define __xwcd_ds_soc_gpio_h__
23
24#include <xwcd/ds/standard.h>
25#include <xwcd/ds/soc/chip.h>
26
32#define XWDS_GPIO_PIN(n) (1U << (n))
33#define XWDS_GPIO_PIN_MASK(n) (XWDS_GPIO_PIN(n) - 1U)
34
65};
66
103};
104
118xwer_t xwds_gpio_req(struct xwds_soc * soc, xwid_t port, xwsq_t pinmask);
119
133xwer_t xwds_gpio_rls(struct xwds_soc * soc, xwid_t port, xwsq_t pinmask);
134
149xwer_t xwds_gpio_cfg(struct xwds_soc * soc, xwid_t port, xwsq_t pinmask, void * cfg);
150
165xwer_t xwds_gpio_set(struct xwds_soc * soc, xwid_t port, xwsq_t pinmask);
166
181xwer_t xwds_gpio_reset(struct xwds_soc * soc, xwid_t port, xwsq_t pinmask);
182
197xwer_t xwds_gpio_toggle(struct xwds_soc * soc, xwid_t port, xwsq_t pinmask);
198
215xwer_t xwds_gpio_output(struct xwds_soc * soc,
216 xwid_t port, xwsq_t pinmask,
217 xwsq_t out);
218
234xwer_t xwds_gpio_input(struct xwds_soc * soc,
235 xwid_t port, xwsq_t pinmask,
236 xwsq_t * inbuf);
241#endif /* xwcd/ds/soc/gpio.h */
#define XWDS_GPIO_PIN(n)
Definition gpio.h:32
xwer_t xwds_gpio_reset(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:将SOC的GPIO设置为低电平
Definition gpio.c:170
xwer_t xwds_gpio_input(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask, xwsq_t *inbuf)
XWDS API:并行读取多个SOC的GPIO
Definition gpio.c:289
xwer_t xwds_gpio_cfg(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask, void *cfg)
XWDS API:配置SOC的GPIO
Definition gpio.c:96
xwer_t xwds_gpio_rls(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:释放SOC的GPIO
Definition gpio.c:63
xwer_t xwds_gpio_toggle(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:翻转SOC的GPIO电平
Definition gpio.c:209
xwds_gpio_port_em
XWDS GPIO Port 枚举
Definition gpio.h:38
xwds_gpio_pin_em
XWDS GPIO Pin 枚举
Definition gpio.h:70
xwer_t xwds_gpio_set(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:将SOC的GPIO设置为高电平
Definition gpio.c:131
xwer_t xwds_gpio_output(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask, xwsq_t out)
XWDS API:并行输出多个SOC的GPIO
Definition gpio.c:248
xwer_t xwds_gpio_req(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:申请SOC的GPIO
Definition gpio.c:27
signed long xwer_t
Definition type.h:554
unsigned long xwid_t
Definition type.h:481
unsigned long xwsq_t
Definition type.h:445
玄武设备栈:SOC
@ XWDS_GPIO_PORT_M
Definition gpio.h:51
@ XWDS_GPIO_PORT_X
Definition gpio.h:62
@ XWDS_GPIO_PORT_D
Definition gpio.h:42
@ XWDS_GPIO_PORT_N
Definition gpio.h:52
@ XWDS_GPIO_PORT_C
Definition gpio.h:41
@ XWDS_GPIO_PORT_Z
Definition gpio.h:64
@ XWDS_GPIO_PORT_H
Definition gpio.h:46
@ XWDS_GPIO_PORT_S
Definition gpio.h:57
@ XWDS_GPIO_PORT_F
Definition gpio.h:44
@ XWDS_GPIO_PORT_Y
Definition gpio.h:63
@ XWDS_GPIO_PORT_B
Definition gpio.h:40
@ XWDS_GPIO_PORT_U
Definition gpio.h:59
@ XWDS_GPIO_PORT_T
Definition gpio.h:58
@ XWDS_GPIO_PORT_W
Definition gpio.h:61
@ XWDS_GPIO_PORT_L
Definition gpio.h:50
@ XWDS_GPIO_PORT_E
Definition gpio.h:43
@ XWDS_GPIO_PORT_I
Definition gpio.h:47
@ XWDS_GPIO_PORT_Q
Definition gpio.h:55
@ XWDS_GPIO_PORT_P
Definition gpio.h:54
@ XWDS_GPIO_PORT_K
Definition gpio.h:49
@ XWDS_GPIO_PORT_R
Definition gpio.h:56
@ XWDS_GPIO_PORT_O
Definition gpio.h:53
@ XWDS_GPIO_PORT_J
Definition gpio.h:48
@ XWDS_GPIO_PORT_G
Definition gpio.h:45
@ XWDS_GPIO_PORT_V
Definition gpio.h:60
@ XWDS_GPIO_PORT_A
Definition gpio.h:39
@ XWDS_GPIO_PIN_12
Definition gpio.h:83
@ XWDS_GPIO_PIN_5
Definition gpio.h:76
@ XWDS_GPIO_PIN_26
Definition gpio.h:97
@ XWDS_GPIO_PIN_22
Definition gpio.h:93
@ XWDS_GPIO_PIN_9
Definition gpio.h:80
@ XWDS_GPIO_PIN_11
Definition gpio.h:82
@ XWDS_GPIO_PIN_16
Definition gpio.h:87
@ XWDS_GPIO_PIN_7
Definition gpio.h:78
@ XWDS_GPIO_PIN_10
Definition gpio.h:81
@ XWDS_GPIO_PIN_20
Definition gpio.h:91
@ XWDS_GPIO_PIN_3
Definition gpio.h:74
@ XWDS_GPIO_PIN_19
Definition gpio.h:90
@ XWDS_GPIO_PIN_4
Definition gpio.h:75
@ XWDS_GPIO_PIN_18
Definition gpio.h:89
@ XWDS_GPIO_PIN_1
Definition gpio.h:72
@ XWDS_GPIO_PIN_13
Definition gpio.h:84
@ XWDS_GPIO_PIN_30
Definition gpio.h:101
@ XWDS_GPIO_PIN_17
Definition gpio.h:88
@ XWDS_GPIO_PIN_15
Definition gpio.h:86
@ XWDS_GPIO_PIN_27
Definition gpio.h:98
@ XWDS_GPIO_PIN_2
Definition gpio.h:73
@ XWDS_GPIO_PIN_6
Definition gpio.h:77
@ XWDS_GPIO_PIN_29
Definition gpio.h:100
@ XWDS_GPIO_PIN_14
Definition gpio.h:85
@ XWDS_GPIO_PIN_28
Definition gpio.h:99
@ XWDS_GPIO_PIN_23
Definition gpio.h:94
@ XWDS_GPIO_PIN_24
Definition gpio.h:95
@ XWDS_GPIO_PIN_25
Definition gpio.h:96
@ XWDS_GPIO_PIN_31
Definition gpio.h:102
@ XWDS_GPIO_PIN_0
Definition gpio.h:71
@ XWDS_GPIO_PIN_8
Definition gpio.h:79
@ XWDS_GPIO_PIN_21
Definition gpio.h:92
SOC设备
Definition chip.h:161
玄武设备栈:顶级头文件