mirror of https://github.com/MLXXXp/Arduboy2.git
Make lcdBootProgram[] a member of Arduboy2Core
The lcdBootProgram[] array, containing the commands to initialize the OLED display, isn't considered to be part of the API. To enforce this, and to avoid the possibility of conflicts from other code using the same name, it has been changed from being a global variable to a protected member of the Arduboy2Core class.
This commit is contained in:
parent
a04edf24c1
commit
30fb448db5
|
@ -8,7 +8,15 @@
|
||||||
|
|
||||||
#include <avr/wdt.h>
|
#include <avr/wdt.h>
|
||||||
|
|
||||||
const PROGMEM uint8_t lcdBootProgram[] = {
|
|
||||||
|
//========================================
|
||||||
|
//========== class Arduboy2Core ==========
|
||||||
|
//========================================
|
||||||
|
|
||||||
|
Arduboy2Core::Arduboy2Core() { }
|
||||||
|
|
||||||
|
// Commands sent to the OLED display to initialize it
|
||||||
|
const PROGMEM uint8_t Arduboy2Core::lcdBootProgram[] = {
|
||||||
// boot defaults are commented out but left here in case they
|
// boot defaults are commented out but left here in case they
|
||||||
// might prove useful for reference
|
// might prove useful for reference
|
||||||
//
|
//
|
||||||
|
@ -72,13 +80,6 @@ const PROGMEM uint8_t lcdBootProgram[] = {
|
||||||
// 0x22, 0x00, PAGE_ADDRESS_END
|
// 0x22, 0x00, PAGE_ADDRESS_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//========================================
|
|
||||||
//========== class Arduboy2Core ==========
|
|
||||||
//========================================
|
|
||||||
|
|
||||||
Arduboy2Core::Arduboy2Core() { }
|
|
||||||
|
|
||||||
void Arduboy2Core::boot()
|
void Arduboy2Core::boot()
|
||||||
{
|
{
|
||||||
#ifdef ARDUBOY_SET_CPU_8MHZ
|
#ifdef ARDUBOY_SET_CPU_8MHZ
|
||||||
|
|
|
@ -845,6 +845,8 @@ class Arduboy2Core : public Arduboy2NoUSB
|
||||||
static void bootOLED();
|
static void bootOLED();
|
||||||
static void bootPins();
|
static void bootPins();
|
||||||
static void bootPowerSaving();
|
static void bootPowerSaving();
|
||||||
|
|
||||||
|
static const PROGMEM uint8_t lcdBootProgram[];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue