MCPcopy Create free account
hub / github.com/cbm80amiga/Arduino_ST7789_Fast / setAddrWindow

Method setAddrWindow

Arduino_ST7789_Fast.cpp:375–397  ·  view source on GitHub ↗

----------------------------------------------------------

Source from the content-addressed store, hash-verified

373
374// ----------------------------------------------------------
375void Arduino_ST7789::setAddrWindow(uint16_t xs, uint16_t ys, uint16_t xe, uint16_t ye)
376{
377 xs+=_xstart; xe+=_xstart;
378 ys+=_ystart; ye+=_ystart;
379
380 CS_ACTIVE;
381 SPI_START;
382
383 DC_COMMAND; writeSPI(ST7789_CASET);
384 DC_DATA;
385 writeSPI(xs >> 8); writeSPI(xs);
386 writeSPI(xe >> 8); writeSPI(xe);
387
388 DC_COMMAND; writeSPI(ST7789_RASET);
389 DC_DATA;
390 writeSPI(ys >> 8); writeSPI(ys);
391 writeSPI(ye >> 8); writeSPI(ye);
392
393 DC_COMMAND; writeSPI(ST7789_RAMWR);
394
395 DC_DATA;
396 // no CS_IDLE + SPI_END, DC_DATA to save memory
397}
398
399// ----------------------------------------------------------
400void Arduino_ST7789::pushColor(uint16_t color)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected