st_mfp
.mfp = &st_mfp,
st_mfp.vec_adr = 0x48; /* Software EOI-Mode */
st_mfp.vec_adr = 0x40; /* Automatic EOI-Mode */
st_mfp.int_en_a = 0x00; /* turn off MFP-Ints */
st_mfp.int_en_b = 0x00;
st_mfp.int_mk_a = 0xff; /* no Masking */
st_mfp.int_mk_b = 0xff;
st_mfp.tim_dt_d = 254; /* < 100 Hz */
st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 0xf0) | 0x6;
} while ((st_mfp.par_dt_reg & 0x10) == 0);
st_mfp.active_edge &= ~0x10;
if (hwreg_present(&st_mfp.par_dt_reg)) {
while (!(st_mfp.rcv_stat & 0x80)) /* wait for rx buf filled */
return st_mfp.usart_dta;
st_mfp.trn_stat &= ~0x01; /* disable TX */
st_mfp.usart_ctr = parity | csize | 0x88; /* 1:16 clk mode, 1 stop bit */
st_mfp.tim_ct_cd &= 0x70; /* stop timer D */
st_mfp.tim_dt_d = baud_table[baud];
st_mfp.tim_ct_cd |= 0x01; /* start timer D, 1:4 */
st_mfp.trn_stat |= 0x01; /* enable TX */
while (!(st_mfp.trn_stat & 0x80)) /* wait for tx buf empty */
st_mfp.usart_dta = c;
while ((st_mfp.par_dt_reg & 1) && --i) /* wait for BUSY == L */
last_timer_count = st_mfp.tim_dt_c;
st_mfp.tim_dt_c = INT_TICKS;
st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 15) | 0x60;
count = min(st_mfp.tim_dt_c, last_timer_count);
__asm__ __volatile__ ( "tstb %0" : : "m" (st_mfp.par_dt_reg) : "cc" );
reg = (unsigned char *)&st_mfp.int_en_a + type*4 +
reg = (unsigned char *)&st_mfp.int_en_a + type*4 +
reg = (unsigned char *)&st_mfp.int_en_a + type*4 +
if (!(st_mfp.par_dt_reg & 0x20))
while( st_mfp.par_dt_reg & 0x20 )
st_mfp.data_dir &= ~1;
st_mfp.active_edge &= ~1;
return ((st_mfp.par_dt_reg & 1 ? 0 : PARPORT_STATUS_BUSY) |
mono_moni = (st_mfp.par_dt_reg & 0x80) == 0;
st_mfp.tim_ct_b = 0x10;
st_mfp.active_edge |= 8;
st_mfp.tim_ct_b = 0;
st_mfp.tim_dt_b = 0xf0;
st_mfp.tim_ct_b = 8;
while (st_mfp.tim_dt_b > 1) /* TOS does it this way, don't ask why */
new = st_mfp.tim_dt_b;
new = st_mfp.tim_dt_b;
st_mfp.tim_ct_b = 0x10;
mono_moni = (st_mfp.par_dt_reg & 0x80) == 0;
if ((st_mfp.int_en_a & st_mfp.int_mk_a & 0x20) == 0)
st_mfp.tim_ct_a = 0; /* ++roman: Stop timer before programming! */
st_mfp.tim_dt_a = 1; /* Cause interrupt after first event. */
st_mfp.tim_ct_a = 8; /* Turn on event counting. */
st_mfp.int_en_a |= 0x20; /* Turn interrupt on. */
st_mfp.int_mk_a |= 0x20;
st_mfp.tim_ct_a = 0; /* stop timer */
st_mfp.int_en_a &= ~0x20; /* turn interrupt off */