drv_gpio.h 674 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2006-2022, Synwit Technology Co.,Ltd.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2018-12-10 Zohar_Lee first version
  9. * 2020-07-10 lik rewrite
  10. */
  11. #ifndef __DRV_GPIO_H__
  12. #define __DRV_GPIO_H__
  13. #include "board.h"
  14. #define GET_PIN(GPIOx,PIN) (rt_uint8_t)__SWM_GET_PIN_##GPIOx(PIN)
  15. #define __SWM_GET_PIN_A(PIN) (PIN)
  16. #define __SWM_GET_PIN_B(PIN) (13 + PIN)
  17. #define __SWM_GET_PIN_C(PIN) (26 + PIN)
  18. #define __SWM_GET_PIN_M(PIN) (34 + PIN)
  19. #define __SWM_GET_PIN_N(PIN) (56 + PIN)
  20. #define __SWM_GET_PIN_P(PIN) (76 + PIN)
  21. int swm_pin_init(void);
  22. #endif /* __DRV_GPIO_H__ */