接口函数
| API | 芯片 | |||
|---|---|---|---|---|
| GR551x | GR5526 | GR5x25 | GR533x | |
|
app_io_init |
Y |
Y |
Y |
Y |
|
app_io_deinit |
Y |
Y |
Y |
Y |
|
app_io_read_pin |
Y |
Y |
Y |
Y |
|
app_io_write_pin |
Y |
Y |
Y |
Y |
|
app_io_toggle_pin |
Y |
Y |
Y |
Y |
|
app_io_event_register_cb |
Y |
Y |
Y |
Y |
|
app_io_event_unregister |
Y |
Y |
Y |
Y |
app_io_init
| 函数原型 |
uint16_t app_io_init(app_io_type_t type, app_io_init_t *p_init) |
|---|---|
| 功能说明 |
初始化IO |
| 输入参数 |
|
| 返回值 |
APP_DRV_xxx:详见SDK_Folder\drivers\inc\app_drv_error.h宏定义 |
| 备注 |
app_io_deinit
| 函数原型 |
uint16_t app_io_deinit(app_io_type_t type, uint32_t pin) |
|---|---|
| 功能说明 |
反初始化IO |
| 输入参数 |
|
| 返回值 |
APP_DRV_xxx:详见SDK_Folder\drivers\inc\app_drv_error.h宏定义 |
| 备注 |
app_io_read_pin
| 函数原型 |
app_io_pin_state_t app_io_read_pin(app_io_type_t type, uint32_t pin) |
|---|---|
| 功能说明 |
读取IO电平 |
| 输入参数 |
|
| 返回值 | |
| 备注 |
app_io_write_pin
| 函数原型 |
uint16_t app_io_write_pin(app_io_type_t type, uint32_t pin, app_io_pin_state_t pin_state) |
|---|---|
| 功能说明 |
使能IO输出高低电平 |
| 输入参数 |
|
| 返回值 |
APP_DRV_xxx:详见SDK_Folder\drivers\inc\app_drv_error.h宏定义 |
| 备注 |
app_io_toggle_pin
| 函数原型 |
uint16_t app_io_toggle_pin(app_io_type_t type, uint32_t pin) |
|---|---|
| 功能说明 |
切换IO电平:
|
| 输入参数 |
|
| 返回值 |
APP_DRV_xxx:详见SDK_Folder\drivers\inc\app_drv_error.h宏定义 |
| 备注 |
app_io_event_register_cb
| 函数原型 |
uint16_t app_io_event_register_cb(app_io_type_t type, app_io_init_t *p_init, app_io_callback_t io_evt_cb, void *arg) |
|---|---|
| 功能说明 |
初始化IO,设置IO中断模式,并注册回调函数 |
| 输入参数 |
|
| 返回值 |
APP_DRV_xxx:详见SDK_Folder\drivers\inc\app_drv_error.h宏定义 |
| 备注 |
|
app_io_event_unregister
| 函数原型 |
uint16_t app_io_event_unregister(app_io_type_t type, uint32_t pin) |
|---|---|
| 功能说明 |
反初始化IO,并注销中断回调函数 |
| 输入参数 |
|
| 返回值 |
APP_DRV_xxx:详见SDK_Folder\drivers\inc\app_drv_error.h宏定义 |
| 备注 |