Skip to content

Commit

Permalink
Fix Clear Screen implementation of HD44780
Browse files Browse the repository at this point in the history
Datasheet mandates filling DDRAM with spaces, setting address
counter to DDRAM address 0, and setting entry mode I/D to 1
(increment mode).

The "filling with spaces" was implemented but the rest was missing.
Now added.
  • Loading branch information
akosthekiss committed Oct 8, 2020
1 parent f97e7f0 commit 3e33b6f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/parts/hd44780.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ _hd44780_clear_screen(
hd44780_t *b)
{
memset(b->vram, ' ', 0x80);
b->cursor = 0;
hd44780_set_flag(b, HD44780_FLAG_I_D, 2);
hd44780_set_flag(b, HD44780_FLAG_DIRTY, 1);
avr_raise_irq(b->irq + IRQ_HD44780_ADDR, b->cursor);
}
Expand Down

0 comments on commit 3e33b6f

Please sign in to comment.