PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 3 години
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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_ATMEGA_XX8_H
  15. #define TLC_ATMEGA_XX8_H
  16. /** \file
  17. SPI and timer pins for the ATmega164/324/644. Don't edit these. All
  18. changeable pins are defined in tlc_config.h */
  19. /** VPRG (Sanguino digital pin 15) -> VPRG (TLC pin 27) */
  20. #define DEFAULT_VPRG_PIN PD7
  21. #define DEFAULT_VPRG_PORT PORTD
  22. #define DEFAULT_VPRG_DDR DDRD
  23. /** XERR (Sanguino digital pin 6) -> XERR (TLC pin 16) */
  24. #define DEFAULT_XERR_PIN PB6
  25. #define DEFAULT_XERR_PORT PORTB
  26. #define DEFAULT_XERR_DDR DDRB
  27. #define DEFAULT_XERR_PINS PINB
  28. /** SIN (Sanguino digital pin 5) -> SIN (TLC pin 26) */
  29. #define DEFAULT_BB_SIN_PIN PB5
  30. #define DEFAULT_BB_SIN_PORT PORTB
  31. #define DEFAULT_BB_SIN_DDR DDRB
  32. /** SCLK (Sanguino digital pin 7) -> SCLK (TLC pin 25) */
  33. #define DEFAULT_BB_SCLK_PIN PB7
  34. #define DEFAULT_BB_SCLK_PORT PORTB
  35. #define DEFAULT_BB_SCLK_DDR DDRB
  36. /** MOSI (Sanguino digital pin 5) -> SIN (TLC pin 26) */
  37. #define TLC_MOSI_PIN PB5
  38. #define TLC_MOSI_PORT PORTB
  39. #define TLC_MOSI_DDR DDRB
  40. /** SCK (Sanguino digital pin 7) -> SCLK (TLC pin 25) */
  41. #define TLC_SCK_PIN PB7
  42. #define TLC_SCK_PORT PORTB
  43. #define TLC_SCK_DDR DDRB
  44. /** SS will be set to output as to not interfere with SPI master operation.
  45. If you have changed the pin-outs and the library doesn't seem to work
  46. or works intermittently, make sure this pin is set correctly. This pin
  47. will not be used by the library other than setting its direction to
  48. output. */
  49. #define TLC_SS_PIN PB4
  50. #define TLC_SS_DDR DDRB
  51. /** OC1A (Sanguino digital pin 13) -> XLAT (TLC pin 24) */
  52. #define XLAT_PIN PD5
  53. #define XLAT_PORT PORTD
  54. #define XLAT_DDR DDRD
  55. /** OC1B (Sanguino digital pin 12) -> BLANK (TLC pin 23) */
  56. #define BLANK_PIN PD4
  57. #define BLANK_PORT PORTD
  58. #define BLANK_DDR DDRD
  59. /** OC2B (Sanguino digital pin 14) -> GSCLK (TLC pin 18) */
  60. #define GSCLK_PIN PD6
  61. #define GSCLK_PORT PORTD
  62. #define GSCLK_DDR DDRD
  63. #endif