BLE5.2 1.0
开发文档说明
| 枚举 | 函数
xc_drv_gpio.h 文件参考

浏览源代码.

struct  GPIO_InitCfg_t
 

枚举

enum  GPIO_PinState { GPIO_PIN_RESET = 0u , GPIO_PIN_SET }
 
enum  {
  GPIO_0 , GPIO_1 , GPIO_2 , GPIO_3 ,
  GPIO_4 , GPIO_5 , GPIO_6 , GPIO_7 ,
  GPIO_8 , GPIO_9 , GPIO_10 , GPIO_11 ,
  GPIO_12 , GPIO_13 , GPIO_14 , GPIO_15 ,
  GPIO_16 , GPIO_17 , GPIO_18 , GPIO_19 ,
  GPIO_20 , GPIO_21 , GPIO_22 , GPIO_23 ,
  GPIO_24 , GPIO_25 , GPIO_26 , GPIO_27 ,
  GPIO_28 , GPIO_29 , GPIO_30 , GPIO_31 ,
  GPIO_32 , GPIO_33 , GPIO_34 , GPIO_35 ,
  GPIO_36 , GPIO_37 , GPIO_38 , GPIO_39 ,
  GPIO_MAX , GPIO_NONE
}
 
enum  GPIO_MUX_TypeDef { GPIO_Mux0 = 0 , GPIO_Mux1 , GPIO_Mux2 , GPIO_Mux3 }
 
enum  GPIO_FUN_SEL_TypeDef {
  GPIO_Dx = 0 , UART0_TX , UART0_RX , UART0_CTS ,
  UART0_RTS , I2C_SCL , I2C_SDA , UART1_RX ,
  UART1_TX , SIM_IO , SIM_RST , SIM_CLK_OUT ,
  PWM0 , PWM1 , SSI1_CLK , SSI1_SSN ,
  SSI1_RX , SSI1_TX , PWM0_INV , PWM1_INV
}
 
enum  GPIO_PULL_TypeDef { GPIO_PULLUP = 0 , GPIO_PULLDOWN = 1 , GPIO_NOPULL = 2 }
 
enum  GPIO_DIR_TypeDef { GPIO_DIR_INPUT = 0 , GPIO_DIR_OUTPUT }
 
enum  GPIO_INT_TypeDef {
  NOT_INT = 0 , NA1_INT , NA2_INT , NA3_INT ,
  NA4_INT , RIS_EDGE_INT , NA6_INT , FAIL_EDGE_INT ,
  NA8_INT , RIS_FAIL_EDGE_INT
}
 

函数

void xc_gpio_init (GPIO_InitCfg_t *init_cfg)
 xc_gpio_init
 
void xc_gpio_mux_ctl (uint8_t num, GPIO_MUX_TypeDef mux)
 xc_gpio_init
 
void xc_gpio_fun_sel (uint8_t num, GPIO_FUN_SEL_TypeDef sel)
 
void xc_gpio_pull_config (uint8_t num, GPIO_PULL_TypeDef pull)
 
void xc_gpio_it_config (uint8_t num, GPIO_INT_TypeDef inter)
 
void xc_gpio_direction_config (uint8_t num, GPIO_DIR_TypeDef direction)
 
uint32_t xc_gpio_read_pin (uint8_t num)
 
void xc_gpio_write_pin (uint8_t num, GPIO_PinState pin_state)
 
void xc_gpio_toggle_pin (uint8_t num)
 
void gpio_intr_callback (uint64_t intr_sta)
 

枚举类型说明

◆ anonymous enum

anonymous enum
枚举值
GPIO_0 
GPIO_1 
GPIO_2 
GPIO_3 
GPIO_4 
GPIO_5 
GPIO_6 
GPIO_7 
GPIO_8 
GPIO_9 
GPIO_10 
GPIO_11 
GPIO_12 
GPIO_13 
GPIO_14 
GPIO_15 
GPIO_16 
GPIO_17 
GPIO_18 
GPIO_19 
GPIO_20 
GPIO_21 
GPIO_22 
GPIO_23 
GPIO_24 
GPIO_25 
GPIO_26 
GPIO_27 
GPIO_28 
GPIO_29 
GPIO_30 
GPIO_31 
GPIO_32 
GPIO_33 
GPIO_34 
GPIO_35 
GPIO_36 
GPIO_37 
GPIO_38 
GPIO_39 
GPIO_MAX 
GPIO_NONE 

在文件 xc_drv_gpio.h48 行定义.

◆ GPIO_DIR_TypeDef

枚举值
GPIO_DIR_INPUT 
GPIO_DIR_OUTPUT 

在文件 xc_drv_gpio.h133 行定义.

◆ GPIO_FUN_SEL_TypeDef

枚举值
GPIO_Dx 
UART0_TX 
UART0_RX 
UART0_CTS 
UART0_RTS 
I2C_SCL 
I2C_SDA 
UART1_RX 
UART1_TX 
SIM_IO 
SIM_RST 
SIM_CLK_OUT 
PWM0 
PWM1 
SSI1_CLK 
SSI1_SSN 
SSI1_RX 
SSI1_TX 
PWM0_INV 
PWM1_INV 

在文件 xc_drv_gpio.h102 行定义.

◆ GPIO_INT_TypeDef

枚举值
NOT_INT 
NA1_INT 
NA2_INT 
NA3_INT 
NA4_INT 
RIS_EDGE_INT 
NA6_INT 
FAIL_EDGE_INT 
NA8_INT 
RIS_FAIL_EDGE_INT 

在文件 xc_drv_gpio.h139 行定义.

◆ GPIO_MUX_TypeDef

枚举值
GPIO_Mux0 
GPIO_Mux1 
GPIO_Mux2 
GPIO_Mux3 

在文件 xc_drv_gpio.h94 行定义.

◆ GPIO_PinState

枚举值
GPIO_PIN_RESET 
GPIO_PIN_SET 

在文件 xc_drv_gpio.h42 行定义.

◆ GPIO_PULL_TypeDef

枚举值
GPIO_PULLUP 
GPIO_PULLDOWN 
GPIO_NOPULL 

在文件 xc_drv_gpio.h126 行定义.

函数说明

◆ gpio_intr_callback()

void gpio_intr_callback ( uint64_t  intr_sta)

在文件 xc_drv_gpio.c309 行定义.

◆ xc_gpio_direction_config()

void xc_gpio_direction_config ( uint8_t  num,
GPIO_DIR_TypeDef  direction 
)

在文件 xc_drv_gpio.c252 行定义.

◆ xc_gpio_fun_sel()

void xc_gpio_fun_sel ( uint8_t  num,
GPIO_FUN_SEL_TypeDef  sel 
)

在文件 xc_drv_gpio.c151 行定义.

◆ xc_gpio_init()

void xc_gpio_init ( GPIO_InitCfg_t init_cfg)

xc_gpio_init

Initializes the GPIO port based on structure parameters

参数
[in]init_cfg:This is the structure parameter that the GPIO initializes
[out]void
返回值
void
@other
GPIO_InitCfg.Mux = GPIO_Mux0; GPIO_InitCfg.FunSel = GPIO_Dx; GPIO_InitCfg.Pull = GPIO_NOPULL; Board Led1 Initialization GPIO_InitCfg.Dir = GPIO_DIR_OUTPUT; GPIO_InitCfg.Int = NOT_INT; GPIO_InitCfg.Pin = GPIO_0; xc_gpio_init(&GPIO_InitCfg); Gpio NVIC Enable NVIC_EnableIRQ(GPIO_IRQn);

在文件 xc_drv_gpio.c63 行定义.

◆ xc_gpio_it_config()

void xc_gpio_it_config ( uint8_t  num,
GPIO_INT_TypeDef  inter 
)

在文件 xc_drv_gpio.c240 行定义.

◆ xc_gpio_mux_ctl()

void xc_gpio_mux_ctl ( uint8_t  num,
GPIO_MUX_TypeDef  mux 
)

xc_gpio_init

GPIO Function Selection

参数
[in]num: GPIO number (GPIO_0 -> GPIO_35)
[in]mux: Function Selection
[out]void
返回值
void
@other
  • GPIO0 : < mux=0 gpio_d[0] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO1 : < mux=0 gpio_d[1] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO2 : < mux=0 gpio_d[2] > < mux=1 test_pin[2] > < mux=2 NA > < mux=3 NA >
  • GPIO3 : < mux=0 gpio_d[3] > < mux=1 pwm_capture[0] > < mux=2 NA > < mux=3 NA >
  • GPIO4 : < mux=0 gpio_d[4] > < mux=1 pwm_brk[0] > < mux=2 NA > < mux=3 NA >
  • GPIO5 : < mux=0 gpio_d[5] > < mux=1 pwm_brk[1] > < mux=2 NA > < mux=3 NA >
  • GPIO6 : < mux=0 gpio_d[6] > < mux=1 pwm_brk[2] > < mux=2 NA > < mux=3 NA >
  • GPIO7 : < mux=0 gpio_d[7] > < mux=1 fmc_d[2] > < mux=2 NA > < mux=3 NA >
  • GPIO8 : < mux=0 gpio_d[8] > < mux=1 pwm_capture[1] > < mux=2 NA > < mux=3 NA >
  • GPIO9 : < mux=0 gpio_d[9] > < mux=1 pwm_capture[2] > < mux=2 NA > < mux=3 NA >
  • GPIO10: < mux=0 gpio_d[10] > < mux=1 fmc_d[3] > < mux=2 NA > < mux=3 NA >
  • GPIO11: < mux=0 BOOT_CTL > < mux=1 NA > < mux=2 txen > < mux=3 NA >
  • GPIO12: < mux=0 SWI的 SWCK > < mux=1 NA > < mux=2 rxen > < mux=3 NA >
  • GPIO13: < mux=0 SWI的 SWD > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO14: < mux=0 gpio_d[14] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO15: < mux=0 gpio_d[15] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO16: < mux=0 gpio_d[16] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO17: < mux=0 gpio_d[17] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO18: < mux=0 gpio_d[18] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO19: < mux=0 gpio_d[19] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO20: < mux=0 gpio_d[20] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO21: < mux=0 gpio_d[21] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO22: < mux=0 gpio_d[22] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO23: < mux=0 gpio_d[23] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO24: < mux=0 gpio_d[24] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO25: < mux=0 gpio_d[25] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO27: < mux=0 gpio_d[27] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO28: < mux=0 gpio_d[28] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO29: < mux=0 gpio_d[29] > < mux=1 gpio_d[29] > < mux=1 NA > < mux=2 NA >
  • GPIO30: < mux=0 gpio_d[30] > < mux=1 gpio_d[30] > < mux=1 NA > < mux=2 NA >
  • GPIO31: < mux=0 gpio_d[31] > < mux=1 gpio_d[31] > < mux=1 NA > < mux=2 NA >
  • GPIO32: < mux=0 gpio_d[32] > < mux=1 NA > < mux=2 NA > < mux=3 NA >
  • GPIO33: < mux=0 gpio_d[33] > < mux=1 gpio_d[29] > < mux=1 NA > < mux=2 NA >
  • GPIO34: < mux=0 gpio_d[34] > < mux=1 gpio_d[30] > < mux=1 NA > < mux=2 NA >
  • GPIO35: < mux=0 gpio_d[35] > < mux=1 gpio_d[31] > < mux=1 NA > < mux=2 NA >

在文件 xc_drv_gpio.c124 行定义.

◆ xc_gpio_pull_config()

void xc_gpio_pull_config ( uint8_t  num,
GPIO_PULL_TypeDef  pull 
)

在文件 xc_drv_gpio.c167 行定义.

◆ xc_gpio_read_pin()

uint32_t xc_gpio_read_pin ( uint8_t  num)

在文件 xc_drv_gpio.c263 行定义.

◆ xc_gpio_toggle_pin()

void xc_gpio_toggle_pin ( uint8_t  num)

在文件 xc_drv_gpio.c281 行定义.

◆ xc_gpio_write_pin()

void xc_gpio_write_pin ( uint8_t  num,
GPIO_PinState  pin_state 
)

在文件 xc_drv_gpio.c273 行定义.