1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- /*
- * @file hv_drv_Gpio.h
- * @brief Header file of GPIO module.
- *
- * @verbatim
- * ==============================================================================
- * ##### How to use #####
- * ==============================================================================
- * (+) Use ()
- *
- * @endverbatim
- * @author HiView SoC Software Team
- * @version 1.0.0
- * @date 2023-05-30
- */
- #ifndef _HV_DRV_GPIO_H
- #define _HV_DRV_GPIO_H
- #include "hv_cal_Gpio.h"
- /** @defgroup DRV_GPIO DRV_GPIO
- * drv gpio functions
- * @{
- */
- /**@brief Enable the designated gpio interrupt
- * @param[in] ucPinIdx Specified GPIO pin
- */
- VOID Hv_Drv_Gpio_EnableInt(UCHAR8 ucPinIdx);
- /**@brief Disable the designated gpio interrupt
- * @param[in] ucPinIdx Specified GPIO pin
- */
- VOID Hv_Drv_Gpio_DisableInt(UCHAR8 ucPinIdx);
- /**@brief Set gpio pin interrupt trigger type
- * @param[in] ucPinIdx Specified GPIO pin, enPull Specified pull acion @ref GpioIntTrigMode
- */
- VOID Hv_Drv_Gpio_SetIntTriggerMode(UCHAR8 ucPinIdx, GpioIntTrigMode enIntTrigMode);
- /**@brief Set gpio pin interrupt callback
- * @param ucPinIdx Specified GPIO pin, pfCallBack Specified callback @ref GpioIntCallBack
- */
- VOID Hv_Drv_Gpio_SetIntCallBack(UCHAR8 ucPinIdx, GpioIntCallBack pfCallBack);
- /**
- @brief De-initializes the gpio module interrupts
- */
- VOID Hv_Drv_Gpio_CleanupInt(VOID);
- /**@brief Get interrupt state of designated gpio
- * @param[in] ucPinIdx Specified GPIO pin
- */
- BOOL Hv_Drv_Gpio_GetIntState(UCHAR8 ucPinIdx);
- /**@brief Clear the gpio interrupt status
- * @param[in]: ucPinIdx Specified GPIO pin
- */
- VOID Hv_Drv_Gpio_ClrIntState(UCHAR8 ucPinIdx);
- /**@brief Set gpio pin direction
- * @param[in] ucPinIdx Specified GPIO pin, enPull Specified pull acion @ref GpioDir
- */
- VOID Hv_Drv_Gpio_SetDirection(UCHAR8 ucPinIdx, GpioDir enDir);
- /**@brief Get gpio pin direction
- * @param[in] ucPinIdx Specified GPIO pin
- * @param[out] @ref GpioDir
- */
- GpioDir Hv_Drv_Gpio_GetDirection(UCHAR8 ucPinIdx);
- /**@brief Set gpio pin level
- * @param ucPinIdx Specified GPIO pin, enPull Specified pull acion @ref enLevel
- * @param enLevel high(1) or low(0) level
- */
- VOID Hv_Drv_Gpio_SetPinLevel(UCHAR8 ucPinIdx, GpioLevel enLevel);
- /**@brief Get gpio pin out level
- * @param[in] :ucPinIdx Specified GPIO pin
- * @param[out]: state high(1)/low(0)/invalid(2)
- */
- GpioLevel Hv_Drv_Gpio_GetPinLevel(UCHAR8 ucPinIdx);
- /** @} */
- #endif
|