/* Can be set somewhere, if a SCC master reset has already be done and should
* not be repeated; used by kgdb */ int atari_SCC_reset_done;
EXPORT_SYMBOL(atari_SCC_reset_done);
staticinlinevoid ata_mfp_out(char c)
{ while (!(st_mfp.trn_stat & 0x80)) /* wait for tx buf empty */
barrier();
st_mfp.usart_dta = c;
}
staticvoid atari_mfp_console_write(struct console *co, constchar *str, unsignedint count)
{ while (count--) { if (*str == '\n')
ata_mfp_out('\r');
ata_mfp_out(*str++);
}
}
staticinlinevoid ata_scc_out(char c)
{ do {
MFPDELAY();
} while (!(atari_scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */
MFPDELAY();
atari_scc.cha_b_data = c;
}
staticvoid atari_scc_console_write(struct console *co, constchar *str, unsignedint count)
{ while (count--) { if (*str == '\n')
ata_scc_out('\r');
ata_scc_out(*str++);
}
}
staticinlinevoid ata_midi_out(char c)
{ while (!(acia.mid_ctrl & ACIA_TDRE)) /* wait for tx buf empty */
barrier();
acia.mid_data = c;
}
staticvoid atari_midi_console_write(struct console *co, constchar *str, unsignedint count)
{ while (count--) { if (*str == '\n')
ata_midi_out('\r');
ata_midi_out(*str++);
}
}
staticint ata_par_out(char c)
{ unsignedchar tmp; /* This a some-seconds timeout in case no printer is connected */ unsignedlong i = loops_per_jiffy > 1 ? loops_per_jiffy : 10000000/HZ;
while ((st_mfp.par_dt_reg & 1) && --i) /* wait for BUSY == L */
; if (!i) return0;
sound_ym.rd_data_reg_sel = 15; /* select port B */
sound_ym.wd_data = c; /* put char onto port */
sound_ym.rd_data_reg_sel = 14; /* select port A */
tmp = sound_ym.rd_data_reg_sel;
sound_ym.wd_data = tmp & ~0x20; /* set strobe L */
MFPDELAY(); /* wait a bit */
sound_ym.wd_data = tmp | 0x20; /* set strobe H */ return1;
}
/* loops_per_jiffy isn't initialized yet, so we can't use udelay(). This does a
* delay of ~ 60us. */ #define LONG_DELAY() \ do { \ int i; \ for (i = 100; i > 0; --i) \
MFPDELAY(); \
} while (0)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.