Skip to content

Commit

Permalink
Merge branch 'main' into PXP-Gamepad
Browse files Browse the repository at this point in the history
  • Loading branch information
arntsonl authored Aug 13, 2024
2 parents 54e5eb5 + 580c50b commit 7148f81
Show file tree
Hide file tree
Showing 62 changed files with 673 additions and 378 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
GP2040_BOARDCONFIG: [ARCController, Blank, Pico, PicoW, BentoBox, ergoSHIFTRev2, FightboardV3, FightboardV3Mirrored, FlatboxRev4, FlatboxRev5, FlatboxRev5RGB, FlatboxRev5USBPassthrough, FlatboxRev5Southpaw, Granola, KB2040, KeyboardConverter, Haute42COSMOX, Liatris, MavercadeRev1, MavercadeRev2, MiSTercadeV2, OpenCore0, OpenCore0WASD, PicoAnn, PicoFightingBoard, PXPGamepad, RanaTadpole, ReflexCtrlGenesis6, ReflexCtrlNES, ReflexCtrlSaturn, ReflexCtrlSNES, ReflexCtrlVB, ReflexEncodeV1.2, ReflexEncodeV2.0, RP2040AdvancedBreakoutBoard, RP2040AdvancedBreakoutBoardUSBPassthrough, RP2040MiniBreakoutBoard, SparkFunProMicro, WaveshareZero, Stress, SGFDevices, ZeroRhythm]
GP2040_BOARDCONFIG: [ARCController, Blank, Pico, PicoW, BentoBox, ergoSHIFTRev2, FightboardV3, FightboardV3Mirrored, FlatboxRev4, FlatboxRev5, FlatboxRev5RGB, FlatboxRev5USBPassthrough, FlatboxRev5Southpaw, Granola, KB2040, KeyboardConverter, Haute42COSMOX, Liatris, MavercadeRev1, MavercadeRev2, MiSTercadeV2, OpenCore0, OpenCore0WASD, OSUMGP-RP2040, PicoAnn, PicoFightingBoard, PXPGamepad, RanaTadpole, ReflexCtrlGenesis6, ReflexCtrlNES, ReflexCtrlSaturn, ReflexCtrlSNES, ReflexCtrlVB, ReflexEncodeV1.2, ReflexEncodeV2.0, RP2040AdvancedBreakoutBoard, RP2040AdvancedBreakoutBoardUSBPassthrough, RP2040MiniBreakoutBoard, SparkFunProMicro, WaveshareZero, Stress, SGFDevices, ZeroRhythm]=======

steps:
#Global Setup
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,10 @@ headers/configs
headers/drivers
headers/interfaces
headers/interfaces/i2c
headers/interfaces/i2c/ads1219
headers/interfaces/i2c/pcf8575
headers/interfaces/i2c/ssd1306
headers/interfaces/i2c/wiiextension
headers/gamepad
headers/display
headers/display/fonts
Expand Down
9 changes: 0 additions & 9 deletions configs/FlatboxRev5Southpaw/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |

// Setting GPIO pins to assigned by add-on
//
#define GPIO_PIN_00 GpioAction::ASSIGNED_TO_ADDON
#define GPIO_PIN_11 GpioAction::ASSIGNED_TO_ADDON
#define GPIO_PIN_24 GpioAction::ASSIGNED_TO_ADDON
#define GPIO_PIN_25 GpioAction::ASSIGNED_TO_ADDON
#define GPIO_PIN_26 GpioAction::ASSIGNED_TO_ADDON
#define GPIO_PIN_27 GpioAction::ASSIGNED_TO_ADDON

// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define KEY_DPAD_UP HID_KEY_ARROW_UP // UP | UP | UP | UP | UP | UP |
Expand Down
99 changes: 99 additions & 0 deletions configs/OSUMGP-RP2040/BoardConfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
* SPDX-License-Identifier: MIT
* SPDX-FileCopyrightText: Copyright (c) 2024 OpenStickCommunity (gp2040-ce.info)
*/

#ifndef PICO_BOARD_CONFIG_H_
#define PICO_BOARD_CONFIG_H_

#include "enums.pb.h"
#include "class/hid/hid.h"

#define BOARD_CONFIG_LABEL "OSUMGP-RP2040"

// Main pin mapping configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_22 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |


// Setting GPIO pins to assigned by add-on
//
#define GPIO_PIN_00 GpioAction::ASSIGNED_TO_ADDON // I2C SDA
#define GPIO_PIN_01 GpioAction::ASSIGNED_TO_ADDON // I2C SCL
#define GPIO_PIN_11 GpioAction::ASSIGNED_TO_ADDON // USB D+
#define GPIO_PIN_12 GpioAction::ASSIGNED_TO_ADDON // USB D-
#define GPIO_PIN_25 GpioAction::ASSIGNED_TO_ADDON // On-board LED
#define GPIO_PIN_26 GpioAction::ASSIGNED_TO_ADDON // ADC1 X
#define GPIO_PIN_27 GpioAction::ASSIGNED_TO_ADDON // ADC2 X
#define GPIO_PIN_28 GpioAction::ASSIGNED_TO_ADDON // ADC1 Y
#define GPIO_PIN_29 GpioAction::ASSIGNED_TO_ADDON // ADC2 Y


// Keyboard mapping configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define KEY_DPAD_UP HID_KEY_ARROW_UP // UP | UP | UP | UP | UP | UP |
#define KEY_DPAD_DOWN HID_KEY_ARROW_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define KEY_DPAD_RIGHT HID_KEY_ARROW_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define KEY_DPAD_LEFT HID_KEY_ARROW_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define KEY_BUTTON_B1 HID_KEY_SHIFT_LEFT // B1 | A | B | Cross | 2 | K1 |
#define KEY_BUTTON_B2 HID_KEY_Z // B2 | B | A | Circle | 3 | K2 |
#define KEY_BUTTON_R2 HID_KEY_X // R2 | RT | ZR | R2 | 8 | K3 |
#define KEY_BUTTON_L2 HID_KEY_V // L2 | LT | ZL | L2 | 7 | K4 |
#define KEY_BUTTON_B3 HID_KEY_CONTROL_LEFT // B3 | X | Y | Square | 1 | P1 |
#define KEY_BUTTON_B4 HID_KEY_ALT_LEFT // B4 | Y | X | Triangle | 4 | P2 |
#define KEY_BUTTON_R1 HID_KEY_SPACE // R1 | RB | R | R1 | 6 | P3 |
#define KEY_BUTTON_L1 HID_KEY_C // L1 | LB | L | L1 | 5 | P4 |
#define KEY_BUTTON_S1 HID_KEY_5 // S1 | Back | Minus | Select | 9 | Coin |
#define KEY_BUTTON_S2 HID_KEY_1 // S2 | Start | Plus | Start | 10 | Start |
#define KEY_BUTTON_L3 HID_KEY_EQUAL // L3 | LS | LS | L3 | 11 | LS |
#define KEY_BUTTON_R3 HID_KEY_MINUS // R3 | RS | RS | R3 | 12 | RS |
#define KEY_BUTTON_A1 HID_KEY_9 // A1 | Guide | Home | PS | 13 | ~ |
#define KEY_BUTTON_A2 HID_KEY_F2 // A2 | ~ | Capture | ~ | 14 | ~ |
#define KEY_BUTTON_FN -1 // Hotkey Function |


// J4 - I2C
// SparkFun Micro OLED Breakout recommended
#define HAS_I2C_DISPLAY 1
#define I2C0_ENABLED 1
#define DISPLAY_I2C_ADDR 0x3D
#define I2C0_PIN_SDA 0
#define I2C0_PIN_SCL 1


// J3 - USB Passthrough
#define USB_PERIPHERAL_ENABLED 1
#define USB_PERIPHERAL_PIN_DPLUS 11
#define USB_PERIPHERAL_PIN_ORDER 0


// On-board LED settings
#define BOARD_LED_ENABLED 1
#define BOARD_LED_TYPE ON_BOARD_LED_MODE_MODE_INDICATOR


// Analog settings
#define ANALOG_INPUT_ENABLED 1
#define ANALOG_ADC_1_VRX 26
#define ANALOG_ADC_1_VRY 28
#define ANALOG_ADC_2_VRX 27
#define ANALOG_ADC_2_VRY 29

#endif
5 changes: 5 additions & 0 deletions configs/OSUMGP-RP2040/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# GP2040 Configuration for the OSUMGP-RP2040

![OSUMGP-RP2040](assets/osumgp-rp2040_0.4b-real.jpg)

Configuration for the [OSUMGP-RP2040](https://github.com/NickGuyver/OSUMGP-RP2040). PCB reference design for building a game pad with an embedded RP2040 running GP2040-CE firmware.
Binary file added configs/OSUMGP-RP2040/osumgp-rp2040_0.4b-real.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions headers/addons/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ class DisplayAddon : public GPAddon
DisplayMode currDisplayMode;
DisplayMode prevDisplayMode;
bool turnOffWhenSuspended;

GPGFX_DisplayTypeOptions gpOptions;
};

#endif
4 changes: 2 additions & 2 deletions headers/addons/i2canalog1219.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _I2CAnalog_H
#define _I2CAnalog_H

#include <ADS1219.h>
#include "ads1219_dev.h"

#include "gpaddon.h"

Expand Down Expand Up @@ -47,7 +47,7 @@ class I2CAnalog1219Input : public GPAddon {
virtual void process(); // Analog Process
virtual std::string name() { return I2CAnalog1219Name; }
private:
ADS1219 * ads;
ADS1219Device * ads;
ADS_PINS pins;
int channelHop;
uint32_t uIntervalMS; // ADS1219 Interval
Expand Down
8 changes: 2 additions & 6 deletions headers/addons/wiiext.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "gamepad.h"
#include "storagemanager.h"
#include "peripheralmanager.h"
#include "WiiExtension.h"
#include "wiiextension_dev.h"

// WiiExtension Module Name
#define WiiExtensionName "WiiExtension"
Expand All @@ -22,10 +22,6 @@
#define WII_EXTENSION_ENABLED 0
#endif

#ifndef WII_EXTENSION_I2C_ADDR
#define WII_EXTENSION_I2C_ADDR 0x52
#endif

#ifndef WII_EXTENSION_I2C_SDA_PIN
#define WII_EXTENSION_I2C_SDA_PIN -1
#endif
Expand Down Expand Up @@ -90,7 +86,7 @@ class WiiExtensionInput : public GPAddon {
virtual void preprocess() {}
virtual std::string name() { return WiiExtensionName; }
private:
WiiExtension * wii;
WiiExtensionDevice * wii;
uint32_t uIntervalMS;
uint32_t nextTimer;

Expand Down
26 changes: 26 additions & 0 deletions headers/buttonlayouts.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,32 @@
{GP_ELEMENT_BTN_BUTTON, {89, 37, 4, 4, 1, 1, GAMEPAD_MASK_L2, GP_SHAPE_ELLIPSE}}\
}

#define BUTTON_GROUP_STICKLESSR16A {\
{GP_ELEMENT_DIR_BUTTON, {47, 19, 4, 4, 1, 1, GAMEPAD_MASK_UP, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_DIR_BUTTON, {32, 27, 4, 4, 1, 1, GAMEPAD_MASK_LEFT, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_DIR_BUTTON, {42, 27, 4, 4, 1, 1, GAMEPAD_MASK_DOWN, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_DIR_BUTTON, {50, 32, 4, 4, 1, 1, GAMEPAD_MASK_RIGHT, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_DIR_BUTTON, {52, 47, 4, 4, 1, 1, GAMEPAD_MASK_UP, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {64, 17, 4, 4, 1, 1, GAMEPAD_MASK_L3, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {22, 30, 4, 4, 1, 1, GAMEPAD_MASK_L3, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {66, 45, 4, 4, 1, 1, GAMEPAD_MASK_R3, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {77, 15, 2, 2, 1, 1, GAMEPAD_MASK_A2, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {82, 15, 2, 2, 1, 1, GAMEPAD_MASK_A1, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {87, 15, 2, 2, 1, 1, GAMEPAD_MASK_S1, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {92, 15, 2, 2, 1, 1, GAMEPAD_MASK_S2, GP_SHAPE_ELLIPSE}}\
}

#define BUTTON_GROUP_STICKLESS_BUTTONSR16B {\
{GP_ELEMENT_BTN_BUTTON, {59, 27, 4, 4, 1, 1, GAMEPAD_MASK_B3, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {69, 25, 4, 4, 1, 1, GAMEPAD_MASK_B4, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {79, 25, 4, 4, 1, 1, GAMEPAD_MASK_R1, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {89, 27, 4, 4, 1, 1, GAMEPAD_MASK_L1, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {59, 37, 4, 4, 1, 1, GAMEPAD_MASK_B1, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {69, 35, 4, 4, 1, 1, GAMEPAD_MASK_B2, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {79, 35, 4, 4, 1, 1, GAMEPAD_MASK_R2, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_BTN_BUTTON, {89, 37, 4, 4, 1, 1, GAMEPAD_MASK_L2, GP_SHAPE_ELLIPSE}}\
}

#define BUTTON_GROUP_STICKLESS14A {\
{GP_ELEMENT_DIR_BUTTON, {26, 20, 7, 7, 1, 1, GAMEPAD_MASK_LEFT, GP_SHAPE_ELLIPSE}},\
{GP_ELEMENT_DIR_BUTTON, {42, 20, 7, 7, 1, 1, GAMEPAD_MASK_DOWN, GP_SHAPE_ELLIPSE}},\
Expand Down
2 changes: 2 additions & 0 deletions headers/display/GPGFX.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class GPGFX {

void init(GPGFX_DisplayTypeOptions options);

GPGFX_DisplayTypeOptions getAvailableDisplay();

GPGFX_DisplayBase* getDriver() { return displayDriver; }

// drawing methods
Expand Down
5 changes: 3 additions & 2 deletions headers/display/GPGFX_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ typedef enum {
} GPGFX_DisplaySize;

typedef enum {
TYPE_NONE,
TYPE_SSD1306
DISPLAY_TYPE_NONE,
DISPLAY_TYPE_SSD1306,
DISPLAY_TYPE_COUNT
} GPGFX_DisplayType;

typedef struct {
Expand Down
20 changes: 20 additions & 0 deletions headers/interfaces/i2c/ads1219/ads1219_dev.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef _ADS1219DEVICE_H_
#define _ADS1219DEVICE_H_

#include <vector>

#include "i2cdevicebase.h"
#include "ADS1219.h"

class ADS1219Device : public ADS1219, public I2CDeviceBase {
public:
// Constructor
ADS1219Device() {}
ADS1219Device(PeripheralI2C *i2cController, uint8_t addr = 0x40) : ADS1219(i2cController, addr) {}

std::vector<uint8_t> getDeviceAddresses() const override {
return {0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F};
}
};

#endif
15 changes: 13 additions & 2 deletions headers/interfaces/i2c/displaybase.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
#include <string.h>
#include "pico/stdlib.h"
#include "GPGFX_types.h"
#include "i2cdevicebase.h"

class GPGFX_DisplayBase {
class GPGFX_DisplayBase : public I2CDeviceBase {
public:
GPGFX_DisplayBase() {}
~GPGFX_DisplayBase() {}

virtual void init(GPGFX_DisplayTypeOptions options) {}

virtual void setPower(bool isPowered) {}
Expand All @@ -34,7 +38,14 @@ class GPGFX_DisplayBase {

void setMetrics(GPGFX_DisplayMetrics* metrics) { this->_metrics = metrics; }
GPGFX_DisplayMetrics* getMetrics() { return this->_metrics; }
protected:

std::vector<uint8_t> getDeviceAddresses() const override {
return {};
}

virtual bool isSPI() { return false; }
virtual bool isI2C() { return false; }
private:
GPGFX_DisplayMetrics* _metrics;
};

Expand Down
4 changes: 0 additions & 4 deletions headers/interfaces/i2c/i2cdevicebase.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ class I2CDeviceBase : public DeviceBase {
~I2CDeviceBase() {}

virtual std::vector<uint8_t> getDeviceAddresses() const = 0;

int8_t scanForDevice();
protected:
PeripheralI2C* i2c;
};

#endif
9 changes: 7 additions & 2 deletions headers/interfaces/i2c/pcf8575/pcf8575.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
class PCF8575 : public I2CDeviceBase {
public:
// Constructor
PCF8575() {}
PCF8575(PeripheralI2C *i2cController, uint8_t addr = 0x20) {
this->i2c = i2cController;
this->address = addr;
Expand All @@ -28,21 +29,25 @@ class PCF8575 : public I2CDeviceBase {
void reset();
//void start();

void setI2C(PeripheralI2C *i2cController) { this->i2c = i2cController; }
void setAddress(uint8_t addr) { this->address = addr; }

void send(uint16_t value);
uint16_t receive();

uint16_t pins() { return dataReceived; }

void setPin(uint8_t pinNumber, uint8_t value);
bool getPin(uint8_t pinNumber);
protected:
uint8_t address;
private:
const uint16_t initialValue = 0xFFFF;
uint8_t uc[128];

uint16_t dataSent;
uint16_t dataReceived = initialValue;
protected:
PeripheralI2C* i2c = nullptr;
uint8_t address = 0;
};

#endif
13 changes: 13 additions & 0 deletions headers/interfaces/i2c/ssd1306/obd_ssd1306.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

class GPGFX_OBD_SSD1306 : public GPGFX_DisplayBase {
public:
GPGFX_OBD_SSD1306() {}
~GPGFX_OBD_SSD1306() {}

void init(GPGFX_DisplayTypeOptions options);

void setPower(bool isPowered);
Expand All @@ -27,6 +30,13 @@ class GPGFX_OBD_SSD1306 : public GPGFX_DisplayBase {
void drawSprite(uint8_t* spriteData, uint16_t width, uint16_t height, uint16_t pitch, uint16_t x, uint16_t y, uint8_t priority);

void drawBuffer(uint8_t *pBuffer);

std::vector<uint8_t> getDeviceAddresses() const override {
return {0x3C, 0x3D};
}

bool isSPI() { return this->_isSPI; }
bool isI2C() { return this->_isI2C; }
private:
OBDISP obd;
GPGFX_DisplayTypeOptions _options;
Expand All @@ -36,6 +46,9 @@ class GPGFX_OBD_SSD1306 : public GPGFX_DisplayBase {
void clearScreen(int render);

uint8_t ucBackBuffer[1024];

bool _isSPI = false;
bool _isI2C = true;
};

#endif
Loading

0 comments on commit 7148f81

Please sign in to comment.