drv_pin.h 582 B

1234567891011121314151617181920212223
  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. * 2018-03-13 Liuguang the first version.
  9. * 2018-03-19 Liuguang add GPIO interrupt mode support.
  10. * 2019-07-15 Magicoe The first version for LPC55S6x
  11. */
  12. #ifndef __DRV_PIN_H__
  13. #define __DRV_PIN_H__
  14. #include <rtthread.h>
  15. #include <rtdevice.h>
  16. #define GET_PINS(PORTx, PINx) (32 * PORTx + PINx + 1) /* PORTx:0,1, PINx:0,1...31 */
  17. extern int rt_hw_pin_init(void);
  18. #endif /* __DRV_PIN_H__ */