typedef enum{ | |
GSW_HAL_PINDIR_IN, | |
GSW_HAL_PINDIR_OUT, | |
}gsw_hal_pinDirection; | |
typedef enum{ | |
GSW_HAL_LEVEL_LOW, | |
GSW_HAL_LEVEL_HIGH, | |
}gsw_hal_pinLevel; | |
typedef enum{ | |
GSW_HAL_PULL_NULL, | |
GSW_HAL_PULL_DOWN, | |
GSW_HAL_PULL_UP, | |
}gsw_hal_pinPullSel; | |
typedef enum{ | |
GSW_HAL_USB_DISCONNECTED, | |
GSW_HAL_USB_CONNECTED, | |
}gsw_hal_usbStatus; | |
/** | |
* @brief Gpio init | |
* @param [in]uint32_t gpioNum | |
* @param [in]gsw_hal_pinDirection dir | |
* @param [in]gsw_hal_pinLevel level | |
* @param [in]gsw_hal_pinPullSel pullsel | |
* @retval GSW_HAL_SUCCESS\GSW_HAL_FAIL | |
*/ | |
int32_t gsw_gpio_Init(uint32_t gpioNum, gsw_hal_pinDirection dir, gsw_hal_pinLevel level); | |
/** | |
* @brief Gpio set direction | |
* @param [in]uint32_t gpioNum | |
* @param [in]gsw_hal_pinDirection dir | |
* @retval GSW_HAL_SUCCESS\GSW_HAL_FAIL | |
*/ | |
int32_t gsw_gpio_SetDirection(uint32_t gpioNum, gsw_hal_pinDirection dir); | |
/** | |
* @brief Gpio set level | |
* @param [in]uint32_t gpioNum | |
* @param [in]gsw_hal_pinLevel level | |
* @retval GSW_HAL_SUCCESS\GSW_HAL_FAIL | |
*/ | |
int32_t gsw_gpio_SetLevel(uint32_t gpioNum, gsw_hal_pinLevel level); | |
/** | |
* @brief Gpio get level | |
* @param [in]uint32_t gpioNum | |
* @retval gsw_hal_pinLevel | |
*/ | |
gsw_hal_pinLevel gsw_gpio_GetLevel(uint32_t gpioNum); | |
/** | |
* @brief check whether the usb is connected | |
* @retval gsw_hal_usbStatus | |
*/ | |
gsw_hal_usbStatus gsw_hwpin_is_usb_connected(void); | |
/** | |
* @brief Wakeup_out set level | |
* @retval int32_t | |
*/ | |
int32_t gsw_setWakeupLevel(gsw_hal_pinLevel level); |