drv_gpio.h 676 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. * 2021-07-01 lik first version
  9. */
  10. #ifndef __DRV_GPIO_H__
  11. #define __DRV_GPIO_H__
  12. #include "board.h"
  13. #define GET_PIN(GPIOx,PIN) (rt_uint8_t)__SWM_GET_PIN_##GPIOx(PIN)
  14. #define __SWM_GET_PIN_A(PIN) (PIN)
  15. #define __SWM_GET_PIN_B(PIN) (16 + PIN)
  16. #define __SWM_GET_PIN_C(PIN) (32 + PIN)
  17. #define __SWM_GET_PIN_D(PIN) (48 + PIN)
  18. #define __SWM_GET_PIN_E(PIN) (64 + PIN)
  19. #define __SWM_GET_PIN_M(PIN) (80 + PIN)
  20. #define __SWM_GET_PIN_N(PIN) (96 + PIN)
  21. int swm_pin_init(void);
  22. #endif /* __DRV_GPIO_H__ */