PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

37 Zeilen
1.3KB

  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 Teensy++ pins to the ks0108 Graphics LCD library
  5. */
  6. #ifndef KS0108_CONFIG_H
  7. #define KS0108_CONFIG_H
  8. // default connection - uses most digital pins, leaves most analog pins available
  9. #define CSEL1 7 // CS1 Bit
  10. #define CSEL2 8 // CS2 Bit
  11. #define R_W 6 // R/W Bit
  12. #define D_I 5 // D/I Bit
  13. #define EN 9 // EN Bit
  14. #define LCD_CMD_PORT PORTD // pins 5, 6, 7, 8 - all on port D
  15. // alternate connection - uses most analog pins, leaves most digital pins available
  16. //#define CSEL1 17 // CS1 Bit
  17. //#define CSEL2 16 // CS2 Bit
  18. //#define R_W 18 // R/W Bit
  19. //#define D_I 19 // D/I Bit
  20. //#define EN 20 // EN Bit
  21. //#define LCD_CMD_PORT PORTF // pins 16-19 - all on port F
  22. // these macros map pins to ports using the defines above
  23. // the following should not be changed unless you really know what your doing
  24. #define LCD_DATA_LOW_NBL B // port for low nibble: pins 0, 1, 2, 3
  25. #define LCD_DATA_HIGH_NBL B // port for high nibble: pins 13, 14, 15, 4
  26. // Teensyduino always optimizes digitialWrite when used with const inputs
  27. #define fastWriteHigh(_pin) (digitalWrite((_pin), HIGH))
  28. #define fastWriteLow(_pin) (digitalWrite((_pin), LOW))
  29. #endif