aboutsummaryrefslogtreecommitdiff
path: root/src/tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tty.c')
-rw-r--r--src/tty.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tty.c b/src/tty.c
index f9413b4..c630e23 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -23,11 +23,12 @@ extern const uint8_t font[97][8];
static uint8_t cursor = 0;
static uint8_t timer = 0;
+u8 blink = 0;
void
blink_cursor(void) __critical __interrupt(3)
{
- if (++timer >= 75) {
+ if (++timer >= 75 && blink) {
uint8_t i;
tft_set_area(8 * col, 8 * row, 8, 8);
@@ -131,10 +132,18 @@ addch(char c)
return;
}
- tft_set_area(8 * col, 8 * row, 8, 8);
+ DI;
+ u8 tmp = blink;
+ blink = 0;
+ EI;
+ tft_set_area(8 * col, 8 * row, 8, 8);
draw(c);
+ DI;
+ blink = tmp;
+ EI;
+
buf[(head + row) % TTY_HEIGHT][col] = c;
advance();
}