NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
display_ug2864hsweg01.h
Go to the documentation of this file.
1 /*
2  * This file is part of Ninjaflight.
3  *
4  * Ninjaflight is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * Ninjaflight is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Ninjaflight. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #pragma once
19 
20 #define SCREEN_WIDTH 128
21 #define SCREEN_HEIGHT 64
22 
23 #define FONT_WIDTH 5
24 #define FONT_HEIGHT 7
25 #define HORIZONTAL_PADDING 1
26 #define VERTICAL_PADDING 1
27 
28 #define CHARACTER_WIDTH_TOTAL (FONT_WIDTH + HORIZONTAL_PADDING)
29 #define CHARACTER_HEIGHT_TOTAL (FONT_HEIGHT + VERTICAL_PADDING)
30 
31 #define SCREEN_CHARACTER_COLUMN_COUNT (SCREEN_WIDTH / CHARACTER_WIDTH_TOTAL)
32 #define SCREEN_CHARACTER_ROW_COUNT (SCREEN_HEIGHT / CHARACTER_HEIGHT_TOTAL)
33 
34 #define VERTICAL_BARGRAPH_ZERO_CHARACTER (128 + 32)
35 #define VERTICAL_BARGRAPH_CHARACTER_COUNT 7
36 
37 bool ug2864hsweg01InitI2C(void);
38 
39 void i2c_OLED_set_xy(uint8_t col, uint8_t row);
40 void i2c_OLED_set_line(uint8_t row);
41 void i2c_OLED_send_char(unsigned char ascii);
42 void i2c_OLED_send_string(const char *string);
43 void i2c_OLED_clear_display(void);
45 
void i2c_OLED_send_string(const char *string)
Definition: display_ug2864hsweg01.c:238
bool ug2864hsweg01InitI2C(void)
Definition: display_ug2864hsweg01.c:251
void i2c_OLED_set_xy(uint8_t col, uint8_t row)
Definition: display_ug2864hsweg01.c:212
void i2c_OLED_send_char(unsigned char ascii)
Definition: display_ug2864hsweg01.c:226
void i2c_OLED_clear_display_quick(void)
Definition: display_ug2864hsweg01.c:201
void i2c_OLED_clear_display(void)
Definition: display_ug2864hsweg01.c:183
void i2c_OLED_set_line(uint8_t row)
Definition: display_ug2864hsweg01.c:219