PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

87 行
2.9KB

  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_8_H
  15. #define TLC_ATMEGA_8_H
  16. #if DATA_TRANSFER_MODE == TLC_SPI
  17. #warning SPI cannot be used on the ATmega8 because it interferes with timer2
  18. #warning setting DATA_TRANSFER_MODE to TLC_BITBANG
  19. #define DATA_TRANSFER_MODE TLC_BITBANG
  20. #endif
  21. /** \file
  22. SPI and timer pins for the ATmega8. Don't edit these. All
  23. changeable pins are defined in tlc_config.h */
  24. /** VPRG (Arduino digital pin 8) -> VPRG (TLC pin 27) */
  25. #define DEFAULT_VPRG_PIN PB0
  26. #define DEFAULT_VPRG_PORT PORTB
  27. #define DEFAULT_VPRG_DDR DDRB
  28. /** XERR (Arduino digital pin 12) -> XERR (TLC pin 16) */
  29. #define DEFAULT_XERR_PIN PB4
  30. #define DEFAULT_XERR_PORT PORTB
  31. #define DEFAULT_XERR_DDR DDRB
  32. #define DEFAULT_XERR_PINS PINB
  33. /** SIN (Arduino digital pin 7) -> SIN (TLC pin 26) */
  34. #define DEFAULT_BB_SIN_PIN PD7
  35. #define DEFAULT_BB_SIN_PORT PORTD
  36. #define DEFAULT_BB_SIN_DDR DDRD
  37. /** SCLK (Arduino digital pin 4) -> SCLK (TLC pin 25) */
  38. #define DEFAULT_BB_SCLK_PIN PD4
  39. #define DEFAULT_BB_SCLK_PORT PORTD
  40. #define DEFAULT_BB_SCLK_DDR DDRD
  41. /** MOSI (Arduino digital pin 11) -> SIN (TLC pin 26) */
  42. #define TLC_MOSI_PIN PB3
  43. #define TLC_MOSI_PORT PORTB
  44. #define TLC_MOSI_DDR DDRB
  45. /** SCK (Arduino digital pin 13) -> SCLK (TLC pin 25) */
  46. #define TLC_SCK_PIN PB5
  47. #define TLC_SCK_PORT PORTB
  48. #define TLC_SCK_DDR DDRB
  49. /** SS will be set to output as to not interfere with SPI master operation.
  50. If you have changed the pin-outs and the library doesn't seem to work
  51. or works intermittently, make sure this pin is set correctly. This pin
  52. will not be used by the library other than setting its direction to
  53. output. */
  54. #define TLC_SS_PIN PB2
  55. #define TLC_SS_DDR DDRB
  56. /** OC1A (Arduino digital pin 9) -> XLAT (TLC pin 24) */
  57. #define XLAT_PIN PB1
  58. #define XLAT_PORT PORTB
  59. #define XLAT_DDR DDRB
  60. /** OC1B (Arduino digital pin 10) -> BLANK (TLC pin 23) */
  61. #define BLANK_PIN PB2
  62. #define BLANK_PORT PORTB
  63. #define BLANK_DDR DDRB
  64. /** OC2B (Arduino digital pin 3) -> GSCLK (TLC pin 18) */
  65. #define GSCLK_PIN PD3
  66. #define GSCLK_PORT PORTD
  67. #define GSCLK_DDR DDRD
  68. #endif