202202Ili9341<Interface, Reset, Backlight, BufferSize>::drawHorizontalLine(
203203 glcd::Point start, uint16_t length)
204204{
205- uint16_t const pixelValue { modm::toBigEndian (foregroundColor.color ) };
205+ uint16_t const pixelValue { modm::toBigEndian (foregroundColor.getValue () ) };
206206 auto minLength { std::min (std::size_t (length), BufferSize) };
207207 uint16_t *buffer16 { reinterpret_cast <uint16_t *>(buffer) };
208208 std::fill (buffer16, buffer16+minLength, pixelValue);
223223Ili9341<Interface, Reset, Backlight, BufferSize>::drawVerticalLine(
224224 glcd::Point start, uint16_t length)
225225{
226- uint16_t const pixelValue { modm::toBigEndian (foregroundColor.color ) };
226+ uint16_t const pixelValue { modm::toBigEndian (foregroundColor.getValue () ) };
227227 auto minLength { std::min (std::size_t (length), BufferSize) };
228228 uint16_t *buffer16 { reinterpret_cast <uint16_t *>(buffer) };
229229 std::fill (buffer16, buffer16+minLength, pixelValue);
@@ -248,7 +248,7 @@ Ili9341<Interface, Reset, Backlight, BufferSize>::fillRectangle(
248248 auto const y { upperLeft.getY () };
249249 std::size_t pixelCount { std::size_t (width) * std::size_t (height) };
250250
251- uint16_t const pixelValue { modm::toBigEndian (foregroundColor.color ) };
251+ uint16_t const pixelValue { modm::toBigEndian (foregroundColor.getValue () ) };
252252 auto minLength { std::min (std::size_t (pixelCount), BufferSize) };
253253 uint16_t *buffer16 { reinterpret_cast <uint16_t *>(buffer) };
254254 std::fill (buffer16, buffer16+minLength, pixelValue);
270270Ili9341<Interface, Reset, Backlight, BufferSize>::fillCircle(
271271 glcd::Point center, uint16_t radius)
272272{
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.getValue () >> 8 ) & 0xff ),
274+ uint8_t (foregroundColor.getValue () & 0xff ) };
275275
276276 int16_t f = 1 - radius;
277277 int16_t ddF_x = 0 ;
@@ -317,10 +317,10 @@ void
317317Ili9341<Interface, Reset, Backlight, BufferSize>::drawImageRaw(glcd::Point upperLeft,
318318 uint16_t width, uint16_t height, modm::accessor::Flash<uint8_t > data)
319319{
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.getValue () >> 8 ) & 0xff ),
321+ uint8_t (foregroundColor.getValue () & 0xff ) };
322+ uint8_t const clearColor[] { uint8_t ((backgroundColor.getValue () >> 8 ) & 0xff ),
323+ uint8_t (backgroundColor.getValue () & 0xff ) };
324324
325325 BatchHandle h (*this );
326326
@@ -392,7 +392,7 @@ Ili9341<Interface, Reset, Backlight, BufferSize>::setColoredPixel(
392392 int16_t x, int16_t y, color::Rgb565 const &color)
393393{
394394 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.getValue () >> 8 ) & 0xff ), uint8_t (pixelColor.getValue () & 0xff ) };
396396
397397 BatchHandle h (*this );
398398
0 commit comments