202
202
Ili9341<Interface, Reset, Backlight, BufferSize>::drawHorizontalLine(
203
203
glcd::Point start, uint16_t length)
204
204
{
205
- uint16_t const pixelValue { modm::toBigEndian (foregroundColor.color ) };
205
+ uint16_t const pixelValue { modm::toBigEndian (foregroundColor.value () ) };
206
206
auto minLength { std::min (std::size_t (length), BufferSize) };
207
207
uint16_t *buffer16 { reinterpret_cast <uint16_t *>(buffer) };
208
208
std::fill (buffer16, buffer16+minLength, pixelValue);
223
223
Ili9341<Interface, Reset, Backlight, BufferSize>::drawVerticalLine(
224
224
glcd::Point start, uint16_t length)
225
225
{
226
- uint16_t const pixelValue { modm::toBigEndian (foregroundColor.color ) };
226
+ uint16_t const pixelValue { modm::toBigEndian (foregroundColor.value () ) };
227
227
auto minLength { std::min (std::size_t (length), BufferSize) };
228
228
uint16_t *buffer16 { reinterpret_cast <uint16_t *>(buffer) };
229
229
std::fill (buffer16, buffer16+minLength, pixelValue);
@@ -248,7 +248,7 @@ Ili9341<Interface, Reset, Backlight, BufferSize>::fillRectangle(
248
248
auto const y { upperLeft.getY () };
249
249
std::size_t pixelCount { std::size_t (width) * std::size_t (height) };
250
250
251
- uint16_t const pixelValue { modm::toBigEndian (foregroundColor.color ) };
251
+ uint16_t const pixelValue { modm::toBigEndian (foregroundColor.value () ) };
252
252
auto minLength { std::min (std::size_t (pixelCount), BufferSize) };
253
253
uint16_t *buffer16 { reinterpret_cast <uint16_t *>(buffer) };
254
254
std::fill (buffer16, buffer16+minLength, pixelValue);
270
270
Ili9341<Interface, Reset, Backlight, BufferSize>::fillCircle(
271
271
glcd::Point center, uint16_t radius)
272
272
{
273
- uint8_t const setColor[] { uint8_t ((foregroundColor.color >> 8 ) & 0xff ),
274
- uint8_t (foregroundColor.color & 0xff ) };
273
+ uint8_t const setColor[] { uint8_t ((foregroundColor.value () >> 8 ) & 0xff ),
274
+ uint8_t (foregroundColor.value () & 0xff ) };
275
275
276
276
int16_t f = 1 - radius;
277
277
int16_t ddF_x = 0 ;
@@ -317,10 +317,10 @@ void
317
317
Ili9341<Interface, Reset, Backlight, BufferSize>::drawImageRaw(glcd::Point upperLeft,
318
318
uint16_t width, uint16_t height, modm::accessor::Flash<uint8_t > data)
319
319
{
320
- uint8_t const setColor[] { uint8_t ((foregroundColor.color >> 8 ) & 0xff ),
321
- uint8_t (foregroundColor.color & 0xff ) };
322
- uint8_t const clearColor[] { uint8_t ((backgroundColor.color >> 8 ) & 0xff ),
323
- uint8_t (backgroundColor.color & 0xff ) };
320
+ uint8_t const setColor[] { uint8_t ((foregroundColor.value () >> 8 ) & 0xff ),
321
+ uint8_t (foregroundColor.value () & 0xff ) };
322
+ uint8_t const clearColor[] { uint8_t ((backgroundColor.value () >> 8 ) & 0xff ),
323
+ uint8_t (backgroundColor.value () & 0xff ) };
324
324
325
325
BatchHandle h (*this );
326
326
@@ -392,7 +392,7 @@ Ili9341<Interface, Reset, Backlight, BufferSize>::setColoredPixel(
392
392
int16_t x, int16_t y, color::Rgb565 const &color)
393
393
{
394
394
auto const pixelColor { color };
395
- uint8_t const setColor[] { uint8_t ((pixelColor.color >> 8 ) & 0xff ), uint8_t (pixelColor.color & 0xff ) };
395
+ uint8_t const setColor[] { uint8_t ((pixelColor.value () >> 8 ) & 0xff ), uint8_t (pixelColor.value () & 0xff ) };
396
396
397
397
BatchHandle h (*this );
398
398
0 commit comments