Rev 3 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3 | Rev 7 | ||
|---|---|---|---|
| Line 331... | Line 331... | ||
| 331 | void clearDisplay(void) { |
331 | void clearDisplay(void) { |
| 332 | memset(&display_buffer, 0, (SSD1306_LCDWIDTH * SSD1306_LCDHEIGHT / 8)); |
332 | memset(&display_buffer, 0, (SSD1306_LCDWIDTH * SSD1306_LCDHEIGHT / 8)); |
| 333 | } |
333 | } |
| 334 | 334 | ||
| 335 | void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color) { |
335 | void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color) { |
| 336 | boolean bSwap = false; |
336 | bool bSwap = false; |
| 337 | switch (rotation) { |
337 | switch (rotation) { |
| 338 | case 0: |
338 | case 0: |
| 339 | // 0 degree rotation, do nothing |
339 | // 0 degree rotation, do nothing |
| 340 | break; |
340 | break; |
| 341 | case 1: |
341 | case 1: |
| Line 410... | Line 410... | ||
| 410 | } |
410 | } |
| 411 | } |
411 | } |
| 412 | } |
412 | } |
| 413 | 413 | ||
| 414 | void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color) { |
414 | void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color) { |
| 415 | boolean bSwap = false; |
415 | bool bSwap = false; |
| 416 | switch (rotation) { |
416 | switch (rotation) { |
| 417 | case 0: |
417 | case 0: |
| 418 | break; |
418 | break; |
| 419 | case 1: |
419 | case 1: |
| 420 | // 90 degree rotation, swap x & y for rotation, then invert x and adjust x for h (now to become w) |
420 | // 90 degree rotation, swap x & y for rotation, then invert x and adjust x for h (now to become w) |