oled 1.0
OLED Graphics Control Library
Loading...
Searching...
No Matches
tty.h
Go to the documentation of this file.
1
18
19#ifndef TTY_H_
20#define TTY_H_
21
22 #ifndef F_CPU
30 #define F_CPU 12000000UL
31 #endif
32
33 #ifndef TTY_WIDTH
44 #define TTY_WIDTH (OLED_COLUMN_SIZE/FONT_WIDTH)
45 #endif
46
47 #ifndef TTY_HEIGHT
57 #define TTY_HEIGHT (OLED_ROW_SIZE/OLED_PAGE_SIZE)
58 #endif
59
60 #ifndef TTY_AUTOSCROLL
70 #define TTY_AUTOSCROLL
71 #endif
72
73 #ifndef TTY_ENABLE_PRINTF
83 #define TTY_ENABLE_PRINTF
84 #endif
85
86 #ifndef TTY_DYNAMIC_TEXT
96 // #define TTY_DYNAMIC_TEXT
97
98 #ifdef _DOXYGEN_
99 #define TTY_DYNAMIC_TEXT
100 #endif
101 #endif
102
103 #include <stdio.h>
104 #include <avr/io.h>
105 #include <util/delay.h>
106
107 #include "../oled.h"
108 #include "../font/font.h"
109
117 #define TTY_HOME() (tty_cursor(0, 0))
118
119 void tty_init(void);
120 void tty_cursor(unsigned char column, unsigned char line);
121 void tty_clear_line(unsigned char line);
122
123 char tty_putchar(char character);
124 void tty_string(const char *string);
125
126 #ifdef TTY_ENABLE_PRINTF
127 int tty_printf(char data, FILE *stream);
128 #endif
129
130#endif /* TTY_H_ */
Header file for font handling and character bitmap retrieval.
Header file for OLED display control via hardware or software TWI/I2C.
void tty_init(void)
Initializes the TTY text output interface.
Definition tty.c:44
int tty_printf(char data, FILE *stream)
Writes a single character to the TTY interface (used as a printf output function).
Definition tty.c:225
void tty_clear_line(unsigned char line)
Clears a specific text line on the TTY interface.
Definition tty.c:108
char tty_putchar(char character)
Writes a single character to the TTY text interface on the OLED display.
Definition tty.c:149
void tty_string(const char *string)
Writes a null-terminated string to the TTY text interface.
Definition tty.c:204
void tty_cursor(unsigned char column, unsigned char line)
Sets the cursor position in the TTY text interface.
Definition tty.c:126