/* * drv_gpio.c * * Created on: 2025年4月9日 * Author: 22332 */ #include"drv_gpio.h" #define INPUT_NUM 7 #define OUTPUT_NUM 14 void bsp_gpio_cfg_input(void) { for(uint8_t i=0; i= INPUT_NUM)return -1; pins_channel_type_t read_pins; read_pins = PINS_DRV_ReadPins(g_pArrayPortIn[index].port); return (read_pins>>g_pArrayPortIn[index].pin)&0x01; } void bsp_gpio_pin_write(int index, gpio_pin_level_t status){ if(index >= OUTPUT_NUM)return; PINS_DRV_WritePin(g_pArrayPortOut[index].port,g_pArrayPortOut[index].pin,status); }