hal_dio.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. * @file hal_dio.h
  3. * @author Wang, Tong (wangtong7@midea.com)
  4. * @brief
  5. * @version 0.1
  6. * @date 2021-10-10
  7. *
  8. * @copyright Copyright (c) 2021
  9. *
  10. */
  11. #ifndef _HAL_DIO_H_
  12. #define _HAL_DIO_H_
  13. #include "hal_config.h"
  14. /****************************************************************
  15. *
  16. * Standard Interface
  17. *
  18. * *************************************************************/
  19. /********************/
  20. /* Type definations */
  21. /********************/
  22. #define DIO_LEVEL_HIGH 1
  23. #define DIO_LEVEL_LOW 0
  24. /******************************/
  25. /* Global Interface Variables */
  26. /******************************/
  27. /* !!!Important!!! */
  28. /* Interface Variable Should Not Be Modified By Application */
  29. /**
  30. * @brief Activate pin (with pre-defined active level)
  31. *
  32. * @param index Pin number defined in hal_config.h
  33. */
  34. void Hal_Dio_ActivatePin(uint8_t index);
  35. /**
  36. * @brief Deactivate Pin (with pre-defined active level)
  37. *
  38. * @param index Pin number defined in hal_config.h
  39. */
  40. void Hal_Dio_DeactivatePin(uint8_t index);
  41. /**
  42. * @brief Set pin level
  43. *
  44. * @param index Pin index
  45. * @param level Pin level
  46. */
  47. void Hal_Dio_SetPinLevel(uint8_t index, uint8_t level);
  48. /**
  49. * @brief Init Dio module
  50. *
  51. */
  52. void Hal_Dio_Init();
  53. #endif