10 #if defined(SSD1306_USE_I2C)
40 #elif defined(SSD1306_USE_SPI)
70 #error "You should define SSD1306_USE_SPI or SSD1306_USE_I2C macro"
110 #ifdef SSD1306_MIRROR_VERT
123 #ifdef SSD1306_MIRROR_HORIZ
129 #ifdef SSD1306_INVERSE_COLOR
136 #if (SSD1306_HEIGHT == 128)
143 #if (SSD1306_HEIGHT == 32)
145 #elif (SSD1306_HEIGHT == 64)
147 #elif (SSD1306_HEIGHT == 128)
150 #error "Only 32, 64, or 128 lines of height are supported!"
165 #if (SSD1306_HEIGHT == 32)
167 #elif (SSD1306_HEIGHT == 64)
169 #elif (SSD1306_HEIGHT == 128)
172 #error "Only 32, 64, or 128 lines of height are supported!"
280 if (ch < 32 || ch > 126)
308 if((b << j) & 0x8000) {
359 int32_t deltaX = abs(x2 - x1);
360 int32_t deltaY = abs(y2 - y1);
361 int32_t signX = ((x1 < x2) ? 1 : -1);
362 int32_t signY = ((y1 < y2) ? 1 : -1);
363 int32_t error = deltaX - deltaY;
367 while((x1 != x2) || (y1 != y2))
397 for(i = 1; i < par_size; i++){
398 ssd1306_Line(par_vertex[i - 1].x, par_vertex[i - 1].y, par_vertex[i].x, par_vertex[i].y, color);
409 return (par_deg * 3.14 / 180.0);
420 loc_angle = par_deg % 360;
421 loc_angle = ((par_deg != 0)?par_deg:360);
430 #define CIRCLE_APPROXIMATION_SEGMENTS 36
432 uint32_t approx_segments;
438 uint32_t loc_sweep = 0;
445 approx_degree = loc_sweep / (float)approx_segments;
446 while(count < approx_segments)
449 xp1 = x + (int8_t)(sin(rad)*radius);
450 yp1 = y + (int8_t)(cos(rad)*radius);
452 if(count != approx_segments)
460 xp2 = x + (int8_t)(sin(rad)*radius);
461 yp2 = y + (int8_t)(cos(rad)*radius);
471 int32_t err = 2 - 2 * par_r;
486 err = err + (y * 2 + 1);
487 if(-x == y && e2 <= x) {
501 err = err + (x * 2 + 1);
523 const uint8_t kSetContrastControlRegister = 0x81;