st7565.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* Copyright 2023 Dual Tachyon
  2. * https://github.com/DualTachyon
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef DRIVER_ST7565_H
  17. #define DRIVER_ST7565_H
  18. #include <stdbool.h>
  19. #include <stdint.h>
  20. #define LCD_WIDTH 128
  21. #define LCD_HEIGHT 64
  22. #define FRAME_LINES 7
  23. extern uint8_t gStatusLine[LCD_WIDTH];
  24. extern uint8_t gFrameBuffer[FRAME_LINES][LCD_WIDTH];
  25. void ST7565_DrawLine(const unsigned int Column, const unsigned int Line, const uint8_t *pBitmap, const unsigned int Size);
  26. void ST7565_BlitFullScreen(void);
  27. void ST7565_BlitLine(unsigned line);
  28. void ST7565_BlitStatusLine(void);
  29. void ST7565_FillScreen(uint8_t Value);
  30. void ST7565_Init(void);
  31. void ST7565_FixInterfGlitch(void);
  32. void ST7565_HardwareReset(void);
  33. void ST7565_SelectColumnAndLine(uint8_t Column, uint8_t Line);
  34. void ST7565_WriteByte(uint8_t Value);
  35. #ifdef ENABLE_CONTRAST
  36. void ST7565_SetContrast(const uint8_t value);
  37. uint8_t ST7565_GetContrast(void);
  38. #endif
  39. #endif