drv_pin.h 415 B

12345678910111213141516171819
  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-01-13 Lyons first version
  9. * 2021-06-23 RiceChen add get pin API
  10. */
  11. #ifndef __DRV_PIN_H__
  12. #define __DRV_PIN_H__
  13. #include "board.h"
  14. #define GET_PIN(PORTx, PIN) (32 * (PORTx - 1) + (PIN & 31))
  15. #endif //#ifndef __DRV_PIN_H__