SSD1306 OLED display driver 1.8.2 This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays

ssd1306_1bit.h
Go to the documentation of this file.
1 /*
2 MIT License
3
4 Copyright (c) 2016-2019, Alexey Dynda
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 SOFTWARE.
23 */
29 #ifndef _SSD1306_1BIT_H_
30 #define _SSD1306_1BIT_H_
31
32 #include "nano_gfx_types.h"
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
39 // DIRECT GRAPH FUNCTIONS
41
58 void ssd1306_fillScreen(uint8_t fill_Data);
59
63 void ssd1306_clearScreen(void);
64
69 void ssd1306_negativeMode(void);
70
75 void ssd1306_positiveMode(void);
76
91 uint8_t ssd1306_printFixed(uint8_t xpos, uint8_t y, const char *ch, EFontStyle style);
92
93 #ifndef DOXYGEN_SHOULD_SKIP_THIS
94 uint8_t ssd1306_printFixed_oldStyle(uint8_t xpos, uint8_t y, const char *ch, EFontStyle style);
95 #endif
96
112 uint8_t ssd1306_printFixed2x(uint8_t xpos, uint8_t y, const char ch[], EFontStyle style) __attribute__ ((deprecated));
113
133 uint8_t ssd1306_printFixedN(uint8_t xpos, uint8_t y, const char ch[], EFontStyle style, uint8_t factor);
134
142 size_t ssd1306_write(uint8_t ch);
143
151 size_t ssd1306_print(const char ch[]);
152
162 uint8_t ssd1306_charF6x8(uint8_t x, uint8_t y,
163 const char ch[],
164 EFontStyle style
165 #ifdef __cplusplus
166 = STYLE_NORMAL
167 #endif
168 ) __attribute__ ((deprecated));
169
179 uint8_t ssd1306_charF12x16(uint8_t xpos,
180 uint8_t y,
181 const char ch[],
182 EFontStyle style) __attribute__ ((deprecated));
183
184
198 uint8_t ssd1306_charF6x8_eol(uint8_t left,
199 uint8_t y,
200 const char ch[],
201 EFontStyle style,
202 uint8_t right) __attribute__ ((deprecated));
203
216 void ssd1306_putPixel(uint8_t x, uint8_t y);
217
232 void ssd1306_putPixels(uint8_t x, uint8_t y, uint8_t pixels);
233
241 void ssd1306_drawRect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2);
242
255 void ssd1306_fillRect(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2);
256
269 void ssd1306_drawLine(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2);
270
277 void ssd1306_drawHLine(uint8_t x1, uint8_t y1, uint8_t x2);
278
285 void ssd1306_drawVLine(uint8_t x1, uint8_t y1, uint8_t y2);
286
303 void ssd1306_drawBuffer(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *buf);
304
315 void ssd1306_drawBuffer1_4(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *buf);
316
317
336 void ssd1306_drawBufferFast(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buf);
337
341 #define ssd1306_drawCanvas(x, y, w, h, buf) ssd1306_drawBuffer(x, y, w, h, buf)
342
353 void ssd1306_drawBitmap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *buf);
354
365 void ssd1306_drawXBitmap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *buf);
366
381 void ssd1306_drawBitmap1_4(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *buf);
382
392 void gfx_drawMonoBitmap(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buf);
393
402 void ssd1306_clearBlock(uint8_t x, uint8_t y, uint8_t w, uint8_t h);
403
411 void ssd1306_drawSpriteEx(uint8_t x, uint8_t y, uint8_t w, const uint8_t *sprite);
412
418 void ssd1306_drawSprite(SPRITE *sprite);
419
424 void ssd1306_eraseSprite(SPRITE *sprite);
425
430 void ssd1306_eraseTrace(SPRITE *sprite);
431
440 SPRITE ssd1306_createSprite(uint8_t x, uint8_t y, uint8_t w, const uint8_t *data);
441
448 void ssd1306_replaceSprite(SPRITE *sprite, const uint8_t *data);
449
454 #ifdef __cplusplus
455 }
456 #endif
457
458 #endif // _SSD1306_1BIT_H_
ssd1306_drawBuffer
void ssd1306_drawBuffer(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *buf)
Definition: ssd1306_1bit.c:738
ssd1306_drawBitmap1_4
void ssd1306_drawBitmap1_4(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *buf)
Definition: ssd1306_1bit.c:804
ssd1306_charF6x8
uint8_t ssd1306_charF6x8(uint8_t x, uint8_t y, const char ch[], EFontStyle style=STYLE_NORMAL) __attribute__((deprecated))
Definition: ssd1306_1bit.c:469
ssd1306_putPixels
void ssd1306_putPixels(uint8_t x, uint8_t y, uint8_t pixels)
Definition: ssd1306_1bit.c:612
ssd1306_positiveMode
void ssd1306_positiveMode(void)
Definition: ssd1306_1bit.c:1089
ssd1306_createSprite
SPRITE ssd1306_createSprite(uint8_t x, uint8_t y, uint8_t w, const uint8_t *data)
Definition: ssd1306_1bit.c:1074
ssd1306_printFixed2x
uint8_t ssd1306_printFixed2x(uint8_t xpos, uint8_t y, const char ch[], EFontStyle style) __attribute__((deprecated))
Definition: ssd1306_1bit.c:236
ssd1306_drawXBitmap
void ssd1306_drawXBitmap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *buf)
Definition: ssd1306_1bit.c:837
ssd1306_drawLine
void ssd1306_drawLine(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2)
Definition: ssd1306_1bit.c:639
ssd1306_printFixed
uint8_t ssd1306_printFixed(uint8_t xpos, uint8_t y, const char *ch, EFontStyle style)
Definition: ssd1306_1bit.c:79
ssd1306_drawSprite
void ssd1306_drawSprite(SPRITE *sprite)
Definition: ssd1306_1bit.c:989
ssd1306_drawRect
void ssd1306_drawRect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2)
Definition: ssd1306_1bit.c:717
ssd1306_fillScreen
void ssd1306_fillScreen(uint8_t fill_Data)
Definition: ssd1306_1bit.c:50
ssd1306_eraseTrace
void ssd1306_eraseTrace(SPRITE *sprite)
Definition: ssd1306_1bit.c:1037
ssd1306_drawBitmap
void ssd1306_drawBitmap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *buf)
Definition: ssd1306_1bit.c:786
gfx_drawMonoBitmap
void gfx_drawMonoBitmap(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buf)
Definition: ssd1306_1bit.c:870
SPRITE
Definition: nano_gfx_types.h:146
ssd1306_print
size_t ssd1306_print(const char ch[])
Prints null-terminated string to display at current cursor position.
Definition: ssd1306_1bit.c:458
ssd1306_charF12x16
uint8_t ssd1306_charF12x16(uint8_t xpos, uint8_t y, const char ch[], EFontStyle style) __attribute__((deprecated))
Definition: ssd1306_1bit.c:515
ssd1306_eraseSprite
void ssd1306_eraseSprite(SPRITE *sprite)
Definition: ssd1306_1bit.c:1015
ssd1306_drawVLine
void ssd1306_drawVLine(uint8_t x1, uint8_t y1, uint8_t y2)
Definition: ssd1306_1bit.c:693
nano_gfx_types.h
ssd1306_fillRect
void ssd1306_fillRect(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
Definition: ssd1306_1bit.c:942
ssd1306_drawSpriteEx
void ssd1306_drawSpriteEx(uint8_t x, uint8_t y, uint8_t w, const uint8_t *sprite)
Definition: ssd1306_1bit.c:977
ssd1306_printFixedN
uint8_t ssd1306_printFixedN(uint8_t xpos, uint8_t y, const char ch[], EFontStyle style, uint8_t factor)
Definition: ssd1306_1bit.c:317
ssd1306_drawHLine
void ssd1306_drawHLine(uint8_t x1, uint8_t y1, uint8_t x2)
Definition: ssd1306_1bit.c:683
ssd1306_clearBlock
void ssd1306_clearBlock(uint8_t x, uint8_t y, uint8_t w, uint8_t h)
Definition: ssd1306_1bit.c:927
ssd1306_charF6x8_eol
uint8_t ssd1306_charF6x8_eol(uint8_t left, uint8_t y, const char ch[], EFontStyle style, uint8_t right) __attribute__((deprecated))
Definition: ssd1306_1bit.c:590
ssd1306_clearScreen
void ssd1306_clearScreen(void)
Definition: ssd1306_1bit.c:65
ssd1306_replaceSprite
void ssd1306_replaceSprite(SPRITE *sprite, const uint8_t *data)
Definition: ssd1306_1bit.c:1079
EFontStyle
EFontStyle
Definition: nano_gfx_types.h:69
ssd1306_drawBufferFast
void ssd1306_drawBufferFast(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buf)
Definition: ssd1306_1bit.c:725
ssd1306_negativeMode
void ssd1306_negativeMode(void)
Definition: ssd1306_1bit.c:1084
ssd1306_putPixel
void ssd1306_putPixel(uint8_t x, uint8_t y)
Definition: ssd1306_1bit.c:605
ssd1306_drawBuffer1_4
void ssd1306_drawBuffer1_4(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *buf)
Definition: ssd1306_1bit.c:753
ssd1306_write
size_t ssd1306_write(uint8_t ch)
Prints single character to display at current cursor position.
Definition: ssd1306_1bit.c:418