X-Git-Url: http://git.rot13.org/?p=simavr;a=blobdiff_plain;f=examples%2Fparts%2Fhd44780.c;h=8fe194c4693dbc2be5dc655af9ced2c6bc22c07f;hp=144cbfcecb1ae4fdd3e5a20e1d8e5b2d7f7ae77d;hb=fddb2a02e9feadaefaf690b07a69a1556fb96fd1;hpb=d63e2a190fcc83978ffcead60e2d6db597ed8ecc diff --git a/examples/parts/hd44780.c b/examples/parts/hd44780.c index 144cbfc..8fe194c 100644 --- a/examples/parts/hd44780.c +++ b/examples/parts/hd44780.c @@ -340,8 +340,8 @@ hd44780_pin_changed_hook( b->pinstate = (b->pinstate & ~(1 << irq->irq)) | (value << irq->irq); int eo = old & (1 << IRQ_HD44780_E); int e = b->pinstate & (1 << IRQ_HD44780_E); - // on the E pin rising edge, do stuff otherwise just exit - if (!eo && e) + // on the E pin falling edge, do stuff otherwise just exit + if (eo && !e) avr_cycle_timer_register(b->avr, 1, _hd44780_process_e_pinchange, b); }