Skip to content

Commit

Permalink
Adds ESPboy auto-detection by LovyanGFX
Browse files Browse the repository at this point in the history
  • Loading branch information
m1cr0lab committed Oct 24, 2021
1 parent e718f55 commit fe3e9dd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 233 deletions.
9 changes: 8 additions & 1 deletion lib/ESPboy/ESPboy.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@
*/
#pragma once

#define LGFX_ESPBOY
#define LGFX_USE_V1
#include <LovyanGFX.hpp>
#include <LGFX_AUTODETECT.hpp>

#include <Adafruit_MCP23X17.h>
#include <Adafruit_MCP4725.h>
#include "Button.h"
#include "NeoPixel.h"
#include "lgfx.h"
#include "espboy-logo.h"

constexpr uint8_t TFT_WIDTH = 128;
constexpr uint8_t TFT_HEIGHT = 128;

class ESPboy {

private:
Expand Down
2 changes: 1 addition & 1 deletion lib/ESPboy/espboy-logo.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
static constexpr uint8_t ESPBOY_LOGO_WIDTH = 35;
static constexpr uint8_t ESPBOY_LOGO_HEIGHT = 38;

static constexpr uint16_t ESPBOY_LOGO[] PROGMEM = {
static constexpr PROGMEM uint16_t ESPBOY_LOGO[] = {

0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x40fc, 0x40fc, 0x40fc, 0x40fc, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x40fc, 0x40fc, 0x40fc, 0x40fc, 0x40fc, 0x40fc, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
Expand Down
228 changes: 0 additions & 228 deletions lib/ESPboy/lgfx.h

This file was deleted.

3 changes: 0 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ lib_deps = adafruit/Adafruit MCP4725 @ ^2.0.0
adafruit/Adafruit MCP23017 Arduino Library @ ^2.0.2
https://github.com/lovyan03/LovyanGFX.git#develop

; You can use these flags to overclock the SPI bus to 40 MHz
; build_flags = -D ESPBOY_FAST_SPI [ -D ESPBOY_VSCROLL_FIX ]

; ----------------------------------------------------------------------------
; Using the DAC to control the display backlight LED with dimming effect
; ----------------------------------------------------------------------------
Expand Down

0 comments on commit fe3e9dd

Please sign in to comment.