diff --git a/ion/src/device/display.cpp b/ion/src/device/display.cpp index de55f8c84..1c87a7d74 100644 --- a/ion/src/device/display.cpp +++ b/ion/src/device/display.cpp @@ -4,8 +4,7 @@ extern "C" { #include } -#define SEND_COMMAND(c) {*CommandAddress = LCDCommand::c;} -#define SEND_DATA(...) { uint8_t data[] = {__VA_ARGS__}; for (unsigned int i=0;i> 8); *DataAddress = (x_start & 0xFF); *DataAddress = (x_end >> 8); *DataAddress = (x_end & 0xFF); - *CommandAddress = LCDCommand::PageAddressSet; + *CommandAddress = Command::PageAddressSet; *DataAddress = (y_start >> 8); *DataAddress = (y_start & 0xFF); *DataAddress = (y_end >> 8); *DataAddress = (y_end & 0xFF); - *CommandAddress = LCDCommand::MemoryWrite; + *CommandAddress = Command::MemoryWrite; } void Ion::Screen::pushPixels(const ion_color_t * pixels, size_t numberOfPixels) { diff --git a/ion/src/device/display.h b/ion/src/device/display.h index dade05236..bb1e6502d 100644 --- a/ion/src/device/display.h +++ b/ion/src/device/display.h @@ -30,7 +30,7 @@ namespace Screen { void setDrawingArea(uint16_t x, uint16_t y, uint16_t width, uint16_t height); void pushPixels(const ion_color_t * pixels, size_t numberOfPixels); - enum class LCDCommand : uint8_t { + enum class Command : uint8_t { SleepOut = 0x11, DisplayOn = 0x29, ColumnAddressSet = 0x2A, @@ -56,7 +56,7 @@ namespace Screen { PumpRatioControl = 0xF7, }; - static volatile LCDCommand * const CommandAddress = (LCDCommand *)0x6C000000; + static volatile Command * const CommandAddress = (Command *)0x6C000000; static volatile uint8_t * const DataAddress = (uint8_t *)0x6C000001; } }