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

ks0108_Panel.h 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. ks0108_Panel.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 LCD panel specific configuration
  5. */
  6. #ifndef KS0108_PANEL_H
  7. #define KS0108_PANEL_H
  8. /*********************************************************/
  9. /* Configuration for LCD panel specific configuration */
  10. /*********************************************************/
  11. #define DISPLAY_WIDTH 128
  12. #define DISPLAY_HEIGHT 64
  13. // panel controller chips
  14. #define CHIP_WIDTH 64 // pixels per chip
  15. // you can swap around the elements below if your display is reversed
  16. #ifdef ksSOURCE
  17. #if (DISPLAY_WIDTH / CHIP_WIDTH == 2)
  18. byte chipSelect[] = {1,2}; // this is for 128 pixel displays
  19. #elif (DISPLAY_WIDTH / CHIP_WIDTH == 3)
  20. //byte chipSelect[] = {0, 1, 2}; // this is for 192 pixel displays
  21. byte chipSelect[] = {0, 2, 1}; // this is for 192 pixel displays on sanguino only
  22. #endif
  23. #if (DISPLAY_WIDTH / CHIP_WIDTH == 2)
  24. #define DisableController(chip) fastWriteLow(CSEL1); fastWriteLow(CSEL2); // disable for 128 pixel panels
  25. #else
  26. #define DisableController(chip) fastWriteHigh(CSEL1); fastWriteHigh(CSEL2); // disable for 192 pixel panels
  27. #endif
  28. #define EN_DELAY_VALUE 6 // this is the delay value that may need to be hand tuned for slow panels
  29. #endif // ksSource defined to expose chipSelect only to cpp file
  30. #endif