16FXlib
|
Modules | |
Font (font.h) | |
Internal configurations (lcd.cfg.h) | |
Functions | |
void | lcd_init (void) |
void | lcd_clear (uint8_t color) |
void | lcd_drawPage (uint8_t x, uint8_t page, uint8_t data) |
int8_t | lcd_getPixel (int16_t x, int16_t y) |
void | lcd_drawPixel (int16_t x, int16_t y, uint8_t color) |
void | lcd_drawCircle (int16_t x, int16_t y, uint8_t r, uint8_t color, uint8_t filled) |
void | lcd_drawRect (int16_t x, int16_t y, int16_t w, int16_t h, uint8_t color, uint8_t filled) |
void | lcd_drawLine (int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t color) |
uint8_t | lcd_drawCharacter (uint8_t x, uint8_t page, char ascii, uint8_t color, uint8_t overlay) |
uint8_t | lcd_drawString (uint8_t x1, uint8_t page1, uint8_t x2, uint8_t page2, uint8_t wrap, uint16_t delay, char *firstChar, uint8_t color, uint8_t overlay) |
int16_t | lcd_drawCharacterPrecise (int16_t x, int16_t y, char ascii, uint8_t color, uint8_t orientation, uint8_t font) |
int16_t | lcd_drawStringPrecise (int16_t x, int16_t y, char *firstChar, uint8_t color, uint8_t settings, uint8_t font) |
void | lcd_flush (void) |
LCD size | |
#define | LCD_WIDTH 128 |
#define | LCD_HEIGHT 64 |
void lcd_init | ( | void | ) |
void lcd_clear | ( | uint8_t | color | ) |
Draws a (non-filled) circle onto the display.
x | X coordinate of the center of the circle (0 - 127) |
y | Y coordinate of the center of the circle (0 - 63) |
r | Radius of the circle |
color | 1 = pixels of circle will be active, 0 = inactive |
filled | 1 = circle will be completely filled, 0 = only borderline |
Draws a (filled) rectangle on the display.
x | X coordinate of the upper left corner of the rectangle (0 - 127) |
y | Y coordinate of the upper left corner of the rectangle (0 - 63) |
w | Width of the rectangle (0 - 128) |
h | Height of the rectangle (0 - 64) |
color | 1 = contents will be active, 0 = inactive |
filled | 1 = rectangle will be completely filled, 0 = only borderline |
Draws a line on the display.
x1 | X coordinate of the start of the line (0 - 127) |
y1 | Y coordinate of the start of the line (0 - 63) |
x2 | X coordinate of the end of the line (0 - 127) |
y2 | Y coordinate of the end of the line (0 - 63) |
color | 1 = line will be painted with active pixels, 0 = inactive pixels |
Draws a single character on screen
x | X position to write to (0 - 127) |
page | Page to write to (0 - 7) |
ascii | ASCII value of character to write (0 - 127) |
color | 1 = Character's pixels will be black, 0 = white |
overlay | 1 = pixels not on character's position will not be changed, 0 = the whole 5 pages for each character will be overwritten |
uint8_t lcd_drawString | ( | uint8_t | x1, |
uint8_t | page1, | ||
uint8_t | x2, | ||
uint8_t | page2, | ||
uint8_t | wrap, | ||
uint16_t | delay, | ||
char * | firstChar, | ||
uint8_t | color, | ||
uint8_t | overlay | ||
) |
Draws a string on screen, including line wrapping (if enabled) and delay between characters
x1 | X coordinate of area start (0 - 127) |
page1 | Page of area start (0 - 7) |
x2 | X coordinate of area end, set 0 to ignore (0 - 127) |
page2 | Page of area end (only used if wrap=1) (0 - 7) |
wrap | String will be wrapped to next line if set to 1 |
delay | Wait for specified amount of time between each character (in ms) |
firstChar | Pointer to first character of null-terminated string |
color | 1 = Character's pixels will be black, 0 = white |
overlay | 1 = pixels not on character's position will not be changed, 0 = the whole 5 pages for each character will be overwritten |
int16_t lcd_drawCharacterPrecise | ( | int16_t | x, |
int16_t | y, | ||
char | ascii, | ||
uint8_t | color, | ||
uint8_t | orientation, | ||
uint8_t | font | ||
) |
Draws a single character on screen (pixel precise but slower)
x | X position to write to (0 - 127) |
y | Y position to write to (0 - 63) |
ascii | ASCII value of character to write (0 - 127) |
color | 1 = Character's pixels will be black, 0 = white |
orientation | 1 = vertical, 0 = horizontal |
font | selects the font to use (0=default) |
int16_t lcd_drawStringPrecise | ( | int16_t | x, |
int16_t | y, | ||
char * | firstChar, | ||
uint8_t | color, | ||
uint8_t | settings, | ||
uint8_t | font | ||
) |
Draws a string on screen using pixel-precise methods
x | X coordinate to write to (0 - 127) |
y | Y coordinate to write to (0 - 63) |
firstChar | Pointer to first character of null-terminated string |
color | 1 = Character's pixels will be black, 0 = white |
settings | bitmasked settings |
font | selects the font to use (0=default) |
void lcd_flush | ( | void | ) |
Copies the local buffer to the LCD RAM. (Only needed if LCD_FRAMEBUFFER_MODE is set to 1)