HW_GPIO_ATY.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /**
  2. * @file HW_GPIO_ATY.c
  3. *
  4. * @param Project DEVICE_GENERAL_ATY_LIB
  5. *
  6. * @author ATY
  7. *
  8. * @copyright
  9. * - Copyright 2017 - 2026 MZ-ATY
  10. * - This code follows:
  11. * - MZ-ATY Various Contents Joint Statement -
  12. * <a href="https://mengze.top/MZ-ATY_VCJS">
  13. * https://mengze.top/MZ-ATY_VCJS</a>
  14. * - CC 4.0 BY-NC-SA -
  15. * <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
  16. * https://creativecommons.org/licenses/by-nc-sa/4.0/</a>
  17. * - Your use will be deemed to have accepted the terms of this statement.
  18. *
  19. * @brief Familiar definition of GPIO for users
  20. *
  21. * @version
  22. * - 1_01_220602 > ATY
  23. * -# Preliminary version, first Release
  24. ********************************************************************************
  25. */
  26. #ifndef __HW_GPIO_ATY_C
  27. #define __HW_GPIO_ATY_C
  28. #include "HW_GPIO_ATY.h"
  29. /******************************* For user *************************************/
  30. #if defined (__ATY_IS_8051_COMPILER)
  31. #elif defined(USE_HAL_DRIVER)
  32. // void GPIO_SetOut(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  33. // {
  34. // GPIO_InitTypeDef GPIO_InitStruct;
  35. // __HAL_RCC_GPIOB_CLK_ENABLE();
  36. // GPIO_InitStruct.Pin = GPIO_Pin;
  37. // GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  38. // GPIO_InitStruct.Pull = GPIO_NOPULL;
  39. // GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
  40. // HAL_GPIO_Init(GPIOx, &GPIO_InitStruct);
  41. // }
  42. // void GPIO_SetIn(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  43. // {
  44. // GPIO_InitTypeDef GPIO_InitStruct;
  45. // __HAL_RCC_GPIOB_CLK_ENABLE();
  46. // GPIO_InitStruct.Pin = GPIO_Pin;
  47. // GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
  48. // GPIO_InitStruct.Pull = GPIO_NOPULL;
  49. // GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
  50. // HAL_GPIO_Init(GPIOx, &GPIO_InitStruct);
  51. // }
  52. #endif /* PLATFORM */
  53. /******************************************************************************/
  54. #endif /* __HW_GPIO_ATY_C */
  55. /******************************** End Of File *********************************/