Skip to content

Commit

Permalink
writeBytes()
Browse files Browse the repository at this point in the history
  • Loading branch information
moononournation committed Jan 10, 2024
1 parent b5c31a9 commit fb5bbc9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 75 deletions.
65 changes: 0 additions & 65 deletions src/databus/Arduino_UNOPAR8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,71 +153,6 @@ void Arduino_UNOPAR8::writePixels(uint16_t *data, uint32_t len)
}
}

#if !defined(LITTLE_FOOT_PRINT)
void Arduino_UNOPAR8::writeC8D8(uint8_t c, uint8_t d)
{
DC_LOW();

WRITE(c);

DC_HIGH();

WRITE(d);
}

void Arduino_UNOPAR8::writeC8D16(uint8_t c, uint16_t d)
{
DC_LOW();

WRITE(c);

DC_HIGH();

_data16.value = d;
WRITE(_data16.msb);
WRITE(_data16.lsb);
}

void Arduino_UNOPAR8::writeC8D16D16(uint8_t c, uint16_t d1, uint16_t d2)
{
DC_LOW();

WRITE(c);

DC_HIGH();

_data16.value = d1;
WRITE(_data16.msb);
WRITE(_data16.lsb);

_data16.value = d2;
WRITE(_data16.msb);
WRITE(_data16.lsb);
}

void Arduino_UNOPAR8::writeIndexedPixels(uint8_t *data, uint16_t *idx, uint32_t len)
{
while (len--)
{
_data16.value = idx[*data++];
WRITE(_data16.msb);
WRITE(_data16.lsb);
}
}

void Arduino_UNOPAR8::writeIndexedPixelsDouble(uint8_t *data, uint16_t *idx, uint32_t len)
{
while (len--)
{
_data16.value = idx[*data++];
WRITE(_data16.msb);
WRITE(_data16.lsb);
WRITE(_data16.msb);
WRITE(_data16.lsb);
}
}
#endif // !defined(LITTLE_FOOT_PRINT)

INLINE void Arduino_UNOPAR8::WRITE(uint8_t d)
{
#if defined(ARDUINO_AVR_UNO)
Expand Down
11 changes: 1 addition & 10 deletions src/databus/Arduino_UNOPAR8.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,8 @@ class Arduino_UNOPAR8 : public Arduino_DataBus
void write(uint8_t) override;
void write16(uint16_t) override;
void writeRepeat(uint16_t p, uint32_t len) override;
void writePixels(uint16_t *data, uint32_t len) override;

#if !defined(LITTLE_FOOT_PRINT)
void writeC8D8(uint8_t c, uint8_t d) override;
void writeC8D16(uint8_t c, uint16_t d) override;
void writeC8D16D16(uint8_t c, uint16_t d1, uint16_t d2) override;
void writeBytes(uint8_t *data, uint32_t len) override;

void writeIndexedPixels(uint8_t *data, uint16_t *idx, uint32_t len) override;
void writeIndexedPixelsDouble(uint8_t *data, uint16_t *idx, uint32_t len) override;
#endif // !defined(LITTLE_FOOT_PRINT)
void writePixels(uint16_t *data, uint32_t len) override;

private:
INLINE void WRITE(uint8_t d);
Expand Down

0 comments on commit fb5bbc9

Please sign in to comment.