LCD-ESP32-Driver 1.0
Project includes component for controlling LCD displays. Currently supports only one LCD controller - SSD1283A but it may change in the future.
Loading...
Searching...
No Matches
lcd_font.h
Go to the documentation of this file.
1/*
2 * MIT License
3 *
4 * Copyright (c) 2022 Damian Úlusarczyk
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
7 * and associated documentation files (the "Software"), to deal in the Software without restriction,
8 * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in all copies or substantial
13 * portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
16 * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
18 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 *
20 */
27#ifndef LCD_FONT_H
28#define LCD_FONT_H
29
30#include <stdint.h>
31#include <stdbool.h>
32
33#define LCD_FONT_BYTE_LINE 8
35typedef struct LCD_font_t LCD_font_t;
36
43{
44 const uint16_t width;
45 const uint16_t height;
46 const char firstCharacter;
47 const uint16_t characters;
54 const uint8_t *pixelMap;
55
56 const uint16_t lines;
57 const uint16_t fullLines;
58 const uint16_t lastLine;
59};
60
72bool lcd_font_get_pixel(const LCD_font_t * const font, const char character, const uint16_t x, const uint16_t y, bool * const pixelOut);
73
74#endif /* LCD_FONT_H */
bool lcd_font_get_pixel(const LCD_font_t *const font, const char character, const uint16_t x, const uint16_t y, bool *const pixelOut)
Gets information about pixel existance in specific position of the font character.
Definition: lcd_font.c:49
Describes properties of the font to be drawn on LCD display.
Definition: lcd_font.h:43
const uint16_t characters
Definition: lcd_font.h:47
const uint16_t height
Definition: lcd_font.h:45
const char firstCharacter
Definition: lcd_font.h:46
const uint16_t fullLines
Definition: lcd_font.h:57
const uint16_t width
Definition: lcd_font.h:44
const uint16_t lastLine
Definition: lcd_font.h:58
const uint8_t * pixelMap
Definition: lcd_font.h:54
const uint16_t lines
Definition: lcd_font.h:56