BLE5.2 1.0
开发文档说明
xc_drv_gpio.h
浏览该文件的文档.
1
25#ifndef _XC_DRV_GPIO_H_
26#define _XC_DRV_GPIO_H_
27
28/*-----------------------------------------------------------------------------------
29 INCLUDE HEADE FILES
30 ------------------------------------------------------------------------------------*/
31#include <stdbool.h>
32#include <stdio.h>
33
34#include "xc6xxx.h"
35/*------------------------------------------------------------------------------------
36 Macros
37 -------------------------------------------------------------------------------------*/
38
39/*------------------------------------------------------------------------------------
40 TypeDef
41 -------------------------------------------------------------------------------------*/
42typedef enum
43{
47
48enum
49{
92};
93
94typedef enum
95{
101
102typedef enum
103{
125
126typedef enum
127{
132
133typedef enum
134{
138
139typedef enum
140{
152
153typedef struct
154{
155 uint16_t Pin;
162
163/*------------------------------------------------------------------------------------
164 Global Variables
165 -------------------------------------------------------------------------------------*/
166
167/*------------------------------------------------------------------------------------
168 Exported Functions
169 -------------------------------------------------------------------------------------*/
170void xc_gpio_init(GPIO_InitCfg_t *init_cfg);
171void xc_gpio_mux_ctl(uint8_t num, GPIO_MUX_TypeDef mux);
172void xc_gpio_fun_sel(uint8_t num, GPIO_FUN_SEL_TypeDef sel);
173void xc_gpio_pull_config(uint8_t num, GPIO_PULL_TypeDef pull);
174void xc_gpio_it_config(uint8_t num, GPIO_INT_TypeDef inter);
175void xc_gpio_direction_config(uint8_t num, GPIO_DIR_TypeDef direction);
176uint32_t xc_gpio_read_pin(uint8_t num);
177void xc_gpio_write_pin(uint8_t num, GPIO_PinState pin_state);
178void xc_gpio_toggle_pin(uint8_t num);
179
180void gpio_intr_callback(uint64_t intr_sta);
181#endif // _XC_DRV_AOTIMER_H_
GPIO_DIR_TypeDef Dir
GPIO_FUN_SEL_TypeDef FunSel
GPIO_PULL_TypeDef Pull
GPIO_MUX_TypeDef Mux
GPIO_INT_TypeDef Int
void xc_gpio_fun_sel(uint8_t num, GPIO_FUN_SEL_TypeDef sel)
void xc_gpio_toggle_pin(uint8_t num)
void xc_gpio_direction_config(uint8_t num, GPIO_DIR_TypeDef direction)
void xc_gpio_mux_ctl(uint8_t num, GPIO_MUX_TypeDef mux)
xc_gpio_init
void gpio_intr_callback(uint64_t intr_sta)
void xc_gpio_init(GPIO_InitCfg_t *init_cfg)
xc_gpio_init
Definition xc_drv_gpio.c:63
GPIO_PinState
Definition xc_drv_gpio.h:43
@ GPIO_PIN_SET
Definition xc_drv_gpio.h:45
@ GPIO_PIN_RESET
Definition xc_drv_gpio.h:44
void xc_gpio_it_config(uint8_t num, GPIO_INT_TypeDef inter)
GPIO_DIR_TypeDef
@ GPIO_DIR_OUTPUT
@ GPIO_DIR_INPUT
uint32_t xc_gpio_read_pin(uint8_t num)
GPIO_FUN_SEL_TypeDef
@ GPIO_Dx
@ PWM0
@ I2C_SCL
@ UART0_RX
@ PWM0_INV
@ SSI1_RX
@ UART0_RTS
@ SIM_RST
@ I2C_SDA
@ SIM_IO
@ SIM_CLK_OUT
@ SSI1_SSN
@ UART1_TX
@ UART1_RX
@ PWM1
@ UART0_TX
@ SSI1_TX
@ UART0_CTS
@ SSI1_CLK
@ PWM1_INV
GPIO_PULL_TypeDef
@ GPIO_PULLDOWN
@ GPIO_PULLUP
@ GPIO_NOPULL
GPIO_INT_TypeDef
@ NA3_INT
@ NA6_INT
@ NA2_INT
@ NOT_INT
@ RIS_EDGE_INT
@ NA8_INT
@ NA1_INT
@ NA4_INT
@ FAIL_EDGE_INT
@ RIS_FAIL_EDGE_INT
GPIO_MUX_TypeDef
Definition xc_drv_gpio.h:95
@ GPIO_Mux0
Definition xc_drv_gpio.h:96
@ GPIO_Mux1
Definition xc_drv_gpio.h:97
@ GPIO_Mux3
Definition xc_drv_gpio.h:99
@ GPIO_Mux2
Definition xc_drv_gpio.h:98
void xc_gpio_pull_config(uint8_t num, GPIO_PULL_TypeDef pull)
@ GPIO_26
Definition xc_drv_gpio.h:76
@ GPIO_35
Definition xc_drv_gpio.h:85
@ GPIO_30
Definition xc_drv_gpio.h:80
@ GPIO_20
Definition xc_drv_gpio.h:70
@ GPIO_0
Definition xc_drv_gpio.h:50
@ GPIO_18
Definition xc_drv_gpio.h:68
@ GPIO_15
Definition xc_drv_gpio.h:65
@ GPIO_37
Definition xc_drv_gpio.h:87
@ GPIO_8
Definition xc_drv_gpio.h:58
@ GPIO_6
Definition xc_drv_gpio.h:56
@ GPIO_17
Definition xc_drv_gpio.h:67
@ GPIO_25
Definition xc_drv_gpio.h:75
@ GPIO_MAX
Definition xc_drv_gpio.h:90
@ GPIO_21
Definition xc_drv_gpio.h:71
@ GPIO_39
Definition xc_drv_gpio.h:89
@ GPIO_10
Definition xc_drv_gpio.h:60
@ GPIO_3
Definition xc_drv_gpio.h:53
@ GPIO_7
Definition xc_drv_gpio.h:57
@ GPIO_23
Definition xc_drv_gpio.h:73
@ GPIO_5
Definition xc_drv_gpio.h:55
@ GPIO_24
Definition xc_drv_gpio.h:74
@ GPIO_1
Definition xc_drv_gpio.h:51
@ GPIO_4
Definition xc_drv_gpio.h:54
@ GPIO_9
Definition xc_drv_gpio.h:59
@ GPIO_12
Definition xc_drv_gpio.h:62
@ GPIO_19
Definition xc_drv_gpio.h:69
@ GPIO_29
Definition xc_drv_gpio.h:79
@ GPIO_2
Definition xc_drv_gpio.h:52
@ GPIO_34
Definition xc_drv_gpio.h:84
@ GPIO_27
Definition xc_drv_gpio.h:77
@ GPIO_28
Definition xc_drv_gpio.h:78
@ GPIO_38
Definition xc_drv_gpio.h:88
@ GPIO_NONE
Definition xc_drv_gpio.h:91
@ GPIO_22
Definition xc_drv_gpio.h:72
@ GPIO_13
Definition xc_drv_gpio.h:63
@ GPIO_33
Definition xc_drv_gpio.h:83
@ GPIO_14
Definition xc_drv_gpio.h:64
@ GPIO_36
Definition xc_drv_gpio.h:86
@ GPIO_32
Definition xc_drv_gpio.h:82
@ GPIO_11
Definition xc_drv_gpio.h:61
@ GPIO_16
Definition xc_drv_gpio.h:66
@ GPIO_31
Definition xc_drv_gpio.h:81
void xc_gpio_write_pin(uint8_t num, GPIO_PinState pin_state)