pins_arduino.c 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2006-2024, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2025-10-16 Hydevcode first version
  9. */
  10. #include <Arduino.h>
  11. #include "drv_gpio.h"
  12. #include "pins_arduino.h"
  13. /*
  14. * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]}
  15. * [] means optional
  16. * Digital pins must NOT give the device name and channel.
  17. * Analog pins MUST give the device name and channel(ADC, PWM or DAC).
  18. * Arduino Pin must keep in sequence.
  19. */
  20. const pin_map_t pin_map_table[]=
  21. {
  22. {D00, GET_PIN(19, 0), "uart2"}, /* Serial2-RX */
  23. {D01, GET_PIN(19, 1), "uart2"}, /* Serial2-TX */
  24. {D2, GET_PIN(0, 3)}, /* SPI0_CS*/
  25. {D3, GET_PIN(1, 1), "spi0"}, /* SPI0_MOSI */
  26. {D4, GET_PIN(1, 0), "spi0"}, /* SPI0_MISO */
  27. {D5, GET_PIN(0, 2), "spi0"}, /* SPI_SCK */
  28. {D6, GET_PIN(0, 0), "i2c2"}, /* I2C-SDA (Soft Wire) */
  29. {D7, GET_PIN(0, 1), "i2c2"}, /* I2C-SCL (Soft Wire) */
  30. };