drv_gpio.h 710 B

123456789101112131415161718192021222324252627282930313233
  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. * 2023-07-15 yby the first version
  9. */
  10. #ifndef __DRV_GPIO_H__
  11. #define __DRV_GPIO_H__
  12. #include "board.h"
  13. #define _MSP432_STRING(x) #x
  14. #define _MSP432_PIN_NAME(PORTx,PIN) \
  15. ("P" _MSP432_STRING(PORTx) "." _MSP432_STRING(PIN))
  16. #define GET_PIN(PORTx,PIN) rt_pin_get(_MSP432_PIN_NAME(PORTx,PIN))
  17. /* MSP432 GPIO driver*/
  18. struct pin_index
  19. {
  20. rt_uint8_t index;
  21. rt_uint32_t gpioBaseAddress;
  22. rt_uint32_t pin;
  23. };
  24. int rt_hw_pin_init(void);
  25. #endif /*__DRV_GPIO_H__*/
  26. /************************** end of file ******************/