From: ian Date: Fri, 30 Dec 2005 03:00:10 +0000 (+0000) Subject: set TXIE in PIE not IPR or PIR(!) also get sense of flow control right X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=5b29d59b030260b960316f49522ce4f7e31a854b;p=trains.git set TXIE in PIE not IPR or PIR(!) also get sense of flow control right --- diff --git a/detpic/serout.asm b/detpic/serout.asm index 48b5081..377c555 100644 --- a/detpic/serout.asm +++ b/detpic/serout.asm @@ -37,7 +37,7 @@ serial_addbyte_another @ bra_z addbyte_toomany ; no, we're ok: - bt_f_if1 INTCON, TXIE + bt_f_if1 PIE1, TXIE return ; don't bother messing about if tx is already enabled ; we fall through to portb_read to reenable TXIE if appropriate @@ -60,16 +60,16 @@ portb_read @ mov_fw PORTB bc_f INTCON, RBIF - bt_w_if0 p0_rs232_fcin >> 4 + bt_w_if1 p0_rs232_fcin >> 4 bra txfc_disable ; tx enable: - bs_f PIR1, TXIE + bs_f PIE1, TXIE return ;---------- txfc_disable - bc_f PIR1, TXIE + bc_f PIE1, TXIE goto led_red ; flow control forces us not to transmit ;---------------------------------------------------------------------- @@ -97,7 +97,7 @@ serialtx_intrl @ ; are we ready to transmit ? bt_f_if0 PIR1, TXIF return - bt_f_if0 PIR1, TXIE + bt_f_if0 PIE1, TXIE return ; yes, it's us: @@ -140,7 +140,7 @@ tx_bufempty mov_fw acknmra bra_nz tx_acknmra_send ; nothing at all to do: - bc_f PIR1, TXIE + bc_f PIE1, TXIE call led_black ; we're not transmitting intrl_handled_nostack