----------------------------------------------------------
| 411 | |
| 412 | // ---------------------------------------------------------- |
| 413 | void Arduino_ST7789::drawPixel(int16_t x, int16_t y, uint16_t color) |
| 414 | { |
| 415 | if(x<0 ||x>=_width || y<0 || y>=_height) return; |
| 416 | setAddrWindow(x,y,x+1,y+1); |
| 417 | |
| 418 | writeSPI(color>>8); writeSPI(color); |
| 419 | /* |
| 420 | asm volatile |
| 421 | ( |
| 422 | "out %[spdr],%[hi]\n" |
| 423 | "rjmp .+0\n" // wait 8*2+1 = 17 cycles |
| 424 | "rjmp .+0\n" |
| 425 | "rjmp .+0\n" |
| 426 | "rjmp .+0\n" |
| 427 | "rjmp .+0\n" |
| 428 | "rjmp .+0\n" |
| 429 | "rjmp .+0\n" |
| 430 | "rjmp .+0\n" |
| 431 | "nop\n" |
| 432 | "out %[spdr],%[lo]\n" |
| 433 | //"rjmp .+0\n" // wait 6*2+1 = 13 cycles + sbiw + brne |
| 434 | //"rjmp .+0\n" |
| 435 | //"rjmp .+0\n" |
| 436 | //"rjmp .+0\n" |
| 437 | //"nop\n" |
| 438 | : |
| 439 | : [spdr] "I" (_SFR_IO_ADDR(SPDR)), [lo] "r" ((uint8_t)color), [hi] "r" ((uint8_t)(color>>8)) |
| 440 | ); |
| 441 | */ |
| 442 | CS_IDLE; |
| 443 | SPI_END; |
| 444 | } |
| 445 | |
| 446 | // ---------------------------------------------------------- |
| 447 | void Arduino_ST7789::drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color) |
nothing calls this directly
no outgoing calls
no test coverage detected