18#define ABS(x) ((x) > 0 ? (x) : -(x))
225 int16_t dx, dy, sx, sy, err, e2,
i, tmp;
245 dx = (x0 < x1) ? (x1 - x0) : (x0 - x1);
246 dy = (y0 < y1) ? (y1 - y0) : (y0 - y1);
247 sx = (x0 < x1) ? 1 : -1;
248 sy = (y0 < y1) ? 1 : -1;
249 err = ((dx > dy) ? dx : -dy) / 2;
268 for (
i = y0;
i <= y1;
i++)
294 for (
i = x0;
i <= x1;
i++)
306 if (x0 == x1 && y0 == y1)
uint8_t I2C_Write(uint8_t devAddr, uint8_t memAddr, uint8_t *dat, uint16_t size)
void SYS_Delay(uint16_t t)
void SSD1306_Fill(uint8_t color)
Fills entire LCD with desired color.
void SSD1306_WriteCommand(uint8_t command)
Writes single byte command to slave.
void SSD1306_ToggleInvert(void)
Toggles pixels invertion inside internal RAM.
void SSD1306_GotoXY(uint16_t x, uint16_t y)
Sets cursor pointer to desired location for strings.
void SSD1306_DrawPixel(uint16_t x, uint16_t y, uint8_t color)
Draws pixel at desired location.
void SSD1306_UpdateScreen(void)
Updates buffer from internal RAM to LCD.
void SSD1306_DrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t c)
Draws line on LCD.
void SSD1306_WriteData(uint8_t dat)
Writes single byte data to slave.
static __XDATA uint8_t SSD1306_Buffer_all[SSD1306_WIDTH *SSD1306_HEIGHT/8]
#define SSD1306_COLOR_BLACK
#define SSD1306_COLOR_WHITE