diff options
Diffstat (limited to 'src/tty.c')
-rw-r--r-- | src/tty.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -6,30 +6,30 @@ struct color { uint8_t r, g, b; }; -static unsigned int row = 0; -static unsigned int col = 0; +static u16 row = 0; +static u16 col = 0; // Index of first row inside buf -static volatile uint8_t head = 0; +static volatile u8 head = 0; // TTY's current contents -static volatile uint8_t buf[TTY_HEIGHT][TTY_WIDTH]; +static volatile u8 buf[TTY_HEIGHT][TTY_WIDTH]; static volatile struct color bg_color = {0x00, 0x00, 0x00}; static volatile struct color fg_color = {0xFF, 0xFB, 0x00}; -extern const uint8_t font[97][8]; +extern const u8 font[97][8]; -static uint8_t cursor = 0; -static uint8_t timer = 0; +static u8 cursor = 0; +static u8 timer = 0; u8 blink = 0; void blink_cursor(void) __critical __interrupt(3) { if (++timer >= 75 && blink) { - uint8_t i; + u8 i; tft_set_area(8 * col, 8 * row, 8, 8); tft_ram_wr(); @@ -73,7 +73,7 @@ draw(u8 c) static void scroll(void) { - uint16_t i, j; + u16 i, j; head = (head + 1) % TTY_HEIGHT; for (i = head; i < TTY_HEIGHT; ++i) { @@ -149,7 +149,7 @@ addch(char c) } void -setcur(unsigned int ncol, unsigned int nrow) +setcur(u16 ncol, u16 nrow) { col = ncol; row = nrow; |