drv_gpio.h 1005 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-06-27 AHTYDHD the first version
  9. */
  10. #ifndef __DRV_GPIO_H__
  11. #define __DRV_GPIO_H__
  12. #include <stdint.h>
  13. #include <rtthread.h>
  14. #define _TM4C_PIN(index, gpioport, gpio_index) \
  15. { \
  16. index, GPIO_PORT##gpioport##_BASE, GPIO_PIN_##gpio_index \
  17. }
  18. #define _TM4C_PIN_RESERVE \
  19. { \
  20. -1, 0, 0 \
  21. }
  22. /* TM4C123 GPIO driver*/
  23. struct pin_index
  24. {
  25. int index;
  26. uint32_t gpioBaseAddress;
  27. uint32_t pin;
  28. };
  29. extern int rt_hw_pin_init(void);
  30. #endif /*__DRV_GPIO_H__*/
  31. /************************** end of file ******************/