Skip to content

Commit

Permalink
#45
Browse files Browse the repository at this point in the history
  • Loading branch information
moononournation committed May 10, 2021
1 parent aaac86a commit 6d0dc66
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Arduino_DataBus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ void Arduino_DataBus::batchOperation(uint8_t batch[], size_t len)
for (size_t i = 0; i < len; ++i)
{
uint8_t l = 0;
uint16_t d;
switch (batch[i])
{
case BEGIN_WRITE:
Expand All @@ -74,9 +73,9 @@ void Arduino_DataBus::batchOperation(uint8_t batch[], size_t len)
case WRITE_C16_D16:
l = 2;
case WRITE_COMMAND_16:
d = ((uint16_t)batch[++i]) << 8;
d |= batch[++i];
writeCommand16(d);
_data16.msb = ((uint16_t)batch[++i]) << 8;
_data16.lsb = batch[++i];
writeCommand16(_data16.value);
break;
case WRITE_DATA_8:
l = 1;
Expand Down
2 changes: 2 additions & 0 deletions src/Arduino_DataBus.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ class Arduino_DataBus
public:
Arduino_DataBus();

void unused() { UNUSED(_data16); } // avoid compiler warning

virtual void begin(int32_t speed, int8_t dataMode = -1) = 0;
virtual void beginWrite() = 0;
virtual void endWrite() = 0;
Expand Down
25 changes: 25 additions & 0 deletions src/display/Arduino_ILI9488_3bit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,30 @@ void Arduino_ILI9488_3bit::begin(int32_t speed)
void Arduino_ILI9488_3bit::drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h, uint16_t color, uint16_t bg)
{
printf("Not Implemented drawBitmap()");
UNUSED(x);
UNUSED(y);
UNUSED(bitmap);
UNUSED(w);
UNUSED(h);
UNUSED(color);
UNUSED(bg);
}

void Arduino_ILI9488_3bit::drawIndexedBitmap(int16_t x, int16_t y, uint8_t *bitmap, uint16_t *color_index, int16_t w, int16_t h)
{
printf("Not Implemented drawIndexedBitmap()");
UNUSED(x);
UNUSED(y);
UNUSED(bitmap);
UNUSED(color_index);
UNUSED(w);
UNUSED(h);
}

void Arduino_ILI9488_3bit::draw3bitRGBBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h)
{
UNUSED(x);
UNUSED(y);
_bus->beginWrite();
writeAddrWindow(0, 0, w, h);
_bus->writeBytes(bitmap, w * h / 2);
Expand All @@ -140,11 +155,21 @@ void Arduino_ILI9488_3bit::draw3bitRGBBitmap(int16_t x, int16_t y, uint8_t *bitm
void Arduino_ILI9488_3bit::draw16bitRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap, int16_t w, int16_t h)
{
printf("Not Implemented draw16bitRGBBitmap()");
UNUSED(x);
UNUSED(y);
UNUSED(bitmap);
UNUSED(w);
UNUSED(h);
}

void Arduino_ILI9488_3bit::draw24bitRGBBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h)
{
printf("Not Implemented draw24bitRGBBitmap()");
UNUSED(x);
UNUSED(y);
UNUSED(bitmap);
UNUSED(w);
UNUSED(h);
}

void Arduino_ILI9488_3bit::invertDisplay(bool i)
Expand Down

0 comments on commit 6d0dc66

Please sign in to comment.