PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

81 行
2.0KB

  1. // interrupt pins for known boards
  2. // Teensy and maybe others automatically define this info
  3. #if !defined(CORE_INT0_PIN) && !defined(CORE_INT1_PIN) && !defined(CORE_INT2_PIN)&& !defined(CORE_INT3_PIN)
  4. // Arduino Mega
  5. #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) // Arduino Mega
  6. #define CORE_INT0_PIN 2
  7. #define CORE_INT1_PIN 3
  8. #define CORE_INT2_PIN 21
  9. #define CORE_INT3_PIN 20
  10. #define CORE_INT4_PIN 19
  11. #define CORE_INT5_PIN 18
  12. // Arduino Due (untested)
  13. #elif defined(__SAM3X8E__)
  14. #define CORE_INT_EVERY_PIN
  15. #ifndef PROGMEM
  16. #define PROGMEM
  17. #endif
  18. #ifndef pgm_read_byte
  19. #define pgm_read_byte(addr) (*(const unsigned char *)(addr))
  20. #endif
  21. // Arduino Leonardo (untested)
  22. #elif defined(__AVR_ATmega32U4__) && !defined(CORE_TEENSY)
  23. #define CORE_INT0_PIN 3
  24. #define CORE_INT1_PIN 2
  25. #define CORE_INT2_PIN 0
  26. #define CORE_INT3_PIN 1
  27. // Sanguino (untested)
  28. #elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__) // Sanguino
  29. #define CORE_INT0_PIN 10
  30. #define CORE_INT1_PIN 11
  31. #define CORE_INT2_PIN 2
  32. // Chipkit Uno32 (untested)
  33. #elif defined(__PIC32MX__) && defined(_BOARD_UNO_)
  34. #define CORE_INT0_PIN 38
  35. #define CORE_INT1_PIN 2
  36. #define CORE_INT2_PIN 7
  37. #define CORE_INT3_PIN 8
  38. #define CORE_INT4_PIN 35
  39. // Chipkit Mega32 (untested)
  40. #elif defined(__PIC32MX__) && defined(_BOARD_MEGA_)
  41. #define CORE_INT0_PIN 3
  42. #define CORE_INT1_PIN 2
  43. #define CORE_INT2_PIN 7
  44. #define CORE_INT3_PIN 21
  45. #define CORE_INT4_PIN 20
  46. // http://hlt.media.mit.edu/?p=1229
  47. #elif defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
  48. #define CORE_INT0_PIN 2
  49. #elif defined(__AVR_ATtiny84__)
  50. #define CORE_INT0_PIN 8
  51. //ESP8266 - NodeMCU 0.9 (ESP-12 Module) / NodeMCU 1.0 (ESP-12E Module)
  52. #elif defined(ESP8266)
  53. #define CORE_INT_EVERY_PIN
  54. //ESP32 support
  55. #elif defined(ESP32)
  56. #define CORE_INT_EVERY_PIN
  57. //STM32F1 support
  58. #elif defined(__STM32F1__)
  59. #define CORE_INT_EVERY_PIN
  60. // Arduino Uno, Duemilanove, LilyPad, Mini, Fio, etc...
  61. #else
  62. #define CORE_INT0_PIN 2
  63. #define CORE_INT1_PIN 3
  64. #endif
  65. #endif