\ rfm12_int1.fs : int1-isr _data pin_high? if \ leading edge t1_clear t1_start led_2 low else \ trailing edge \ store bit t1_get \ -- t_diff RXtmp @ 1 lshift \ -- t_diff tmp<<1 swap \ -- tmp<<1 t_diff bit=1 < if \ 1 1+ \ -- tmp<<1 + 1 \ else \ 0 + \ -- tmp<<1 + 0 then \ -- tmp' RXtmp ! \ store nibble bit# @ 4 mod 3 = if RXtmp @ RXbuf bit# @ 4 / + c! 0 RXtmp ! then \ telegram complete? 1 bit# +! bit# @ bits/telegram = if 0 bit# ! 1 fQueue +! then led_2 high then \ clear int1 GIFR c@ $80 or GIFR c! ; : +int1 \ register int1-isr ['] int1-isr INT1Addr int! \ irq on level change MCUCR c@ $04 or MCUCR c! \ clear int1 GIFR c@ $80 or GIFR c! \ enable int1 GICR c@ $80 or GICR c! ; : -int1 \ clear int1 and disable GIFR c@ $80 or GIFR c! GICR c@ $80 invert and GICR c! ;