PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

44 linhas
1.6KB

  1. /*
  2. ks0108_Arduino.h - Arduino library support for ks0108 and compatable graphic LCDs
  3. Copyright (c)2008 Michael Margolis All right reserved
  4. This is the configuration file for mapping Arduino (ATmega168) pins to the ks0108 Graphics LCD library
  5. */
  6. #ifndef KS0108_CONFIG_H
  7. #define KS0108_CONFIG_H
  8. /*********************************************************/
  9. /* Configuration for assigning LCD bits to Arduino Pins */
  10. /*********************************************************/
  11. /* Arduino pins used for Commands - these must be within the range of 30-37
  12. */
  13. #define CSEL1 33 // CS1 Bit // swap pin assignments with CSEL2 if left/right image is reversed
  14. #define CSEL2 34 // CS2 Bit
  15. #define R_W 35 // R/W Bit
  16. #define D_I 36 // D/I Bit
  17. #define EN 37 // EN Bit
  18. #define LCD_CMD_PORT PORTC // Command Output Register for pins 30-37
  19. /* This version uses pins 22-29 for LCD Data */
  20. /*******************************************************/
  21. /* end of Arduino configuration */
  22. /*******************************************************/
  23. // these macros map pins to ports using the defines above
  24. // the following should not be changed unless you really know what your doing
  25. #define LCD_DATA_LOW_NBL A // port for low nibble: A=pins 22-25
  26. #define LCD_DATA_HIGH_NBL A // port for high nibble: A=pins 26-29
  27. // macros to fast write data to pins 30 - 37
  28. #define fastWriteHigh(_pin) (PORTC |= 1 << ((7-(_pin -30)) & 0x07))
  29. #define fastWriteLow(_pin) (PORTC &= ~(1 << ((7-(_pin -30)) & 0x07)))
  30. #endif