dwm_gpio_cfg_input
配置 GPIO 引脚为输入.
-
void dwm_gpio_cfg_input(uint8_t gpio_idx, uint8_t gpio_pull);
- 参数
gpio_idx – 8 位整数(请参阅 gpio_idx 部分了解允许的值)
gpio_pull – 8 位整数(0 无拉,1 下拉,3 上拉).
output – 状态代码.
C代码示例
dwm_gpio_cfg_input(DWM_GPIO_IDX_13, DWM_GPIO_PIN_PULLUP);
dwm_gpio_cfg_input(DWM_GPIO_IDX_9, DWM_GPIO_PIN_NOPULL);
dwm_gpio_cfg_input(DWM_GPIO_IDX_31, DWM_GPIO_PIN_PULLDOWN);
SPI/UART 示例
TLV 请求 |
|||
---|---|---|---|
类型 |
长度 |
价值 |
|
引脚索引 |
拉动配置 |
||
0x29 |
0x02 |
0x0D |
0x03 |
类型0x29 表示命令 dwm_gpio_cfg_input
TLV 响应 |
||
---|---|---|
类型 |
长度 |
价值(参见错误代码) |
0x40 |
0x01 |
0x00 |
类型0x40表示 状态代码 上一条命令的状态码