PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

130 lines
3.0KB

  1. /* Copyright (c) 2009 by Alex Leone <acleone ~AT~ gmail.com>
  2. This file is part of the Arduino TLC5940 Library.
  3. The Arduino TLC5940 Library is free software: you can redistribute it
  4. and/or modify it under the terms of the GNU General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. The Arduino TLC5940 Library is distributed in the hope that it will be
  8. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with The Arduino TLC5940 Library. If not, see
  13. <http://www.gnu.org/licenses/>. */
  14. #ifndef TLC_CHIP_INCLUDES_H
  15. #define TLC_CHIP_INCLUDES_H
  16. /** \file
  17. Includes the chip-specfic defaults and pin definitions. */
  18. #ifdef __AVR__
  19. #include <avr/io.h>
  20. #endif
  21. #ifndef PB0
  22. #define PB0 PORTB0
  23. #define PB1 PORTB1
  24. #define PB2 PORTB2
  25. #define PB3 PORTB3
  26. #define PB4 PORTB4
  27. #define PB5 PORTB5
  28. #define PB6 PORTB6
  29. #define PB7 PORTB7
  30. #endif
  31. #ifndef PC0
  32. #define PC0 PORTC0
  33. #define PC1 PORTC1
  34. #define PC2 PORTC2
  35. #define PC3 PORTC3
  36. #define PC4 PORTC4
  37. #define PC5 PORTC5
  38. #define PC6 PORTC6
  39. #define PC7 PORTC7
  40. #endif
  41. #ifndef PD0
  42. #define PD0 PORTD0
  43. #define PD1 PORTD1
  44. #define PD2 PORTD2
  45. #define PD3 PORTD3
  46. #define PD4 PORTD4
  47. #define PD5 PORTD5
  48. #define PD6 PORTD6
  49. #define PD7 PORTD7
  50. #endif
  51. #ifndef PH0
  52. #define PH0 PORTH0
  53. #define PH1 PORTH1
  54. #define PH2 PORTH2
  55. #define PH3 PORTH3
  56. #define PH4 PORTH4
  57. #define PH5 PORTH5
  58. #define PH6 PORTH6
  59. #define PH7 PORTH7
  60. #endif
  61. /* Chip Specific Pinouts */
  62. #if defined (__AVR_ATmega168__) \
  63. || defined (__AVR_ATmega168P__) \
  64. || defined (__AVR_ATmega88P__) \
  65. || defined (__AVR_ATmega88__) \
  66. || defined (__AVR_ATmega48P__) \
  67. || defined (__AVR_ATmega48__) \
  68. || defined (__AVR_ATmega328P__)
  69. /* Diecimila / Duemilanove / almost everything */
  70. #include "ATmega_xx8.h"
  71. #elif defined (__AVR_ATmega8__)
  72. /* ATmega8 */
  73. #include "ATmega_8.h"
  74. #elif defined (__AVR_ATmega164P__) \
  75. || defined (__AVR_ATmega324P__) \
  76. || defined (__AVR_ATmega644__) \
  77. || defined (__AVR_ATmega644P__)
  78. /* Sanguino */
  79. #include "ATmega_xx4.h"
  80. #elif defined (__AVR_ATmega640__) \
  81. || defined (__AVR_ATmega1280__) \
  82. || defined (__AVR_ATmega1281__) \
  83. || defined (__AVR_ATmega2560__) \
  84. || defined (__AVR_ATmega2561__)
  85. /* Arduino Mega */
  86. #include "Arduino_Mega.h"
  87. #elif defined (__AVR_ATmega32U4__)
  88. /* Teensy 2.0 */
  89. #include "Teensy_xxU4.h"
  90. #elif defined (__AVR_AT90USB646__) \
  91. || defined (__AVR_AT90USB1286__)
  92. /* Teensy++ 2.0 */
  93. #include "Teensypp_xxx6.h"
  94. #elif defined (__MK20DX128__) \
  95. || defined (__MK20DX256__) \
  96. || defined (__MK64FX512__) \
  97. || defined (__MK66FX1M0__)
  98. /* Teensy 3.0 & 3.1 & 3.2 & 3.5 & 3.6*/
  99. #include "Teensy_KinetisK20.h"
  100. #else
  101. #error "Unknown Chip!"
  102. #endif
  103. #endif