Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 721 → Rev 720

/shark/trunk/drivers/serial/scomirq.c
71,6 → 71,8
BYTE b;
unsigned i;
cprintf("(IRQ:%d)",no);
 
for(i=0;i<4;i++)
if (com_irq[i] == no) break;
 
77,7 → 79,7
b = DECODE(com_read(i, IIR));
 
switch (b)
{
{
case LS_CHANGED:
LSR_handler(i);
break;
95,7 → 97,7
void com_irq_enable(unsigned port, unsigned irq)
{
SYS_FLAGS f;
 
f = kern_fsave();
 
com_read(port, LSR);
169,8 → 171,12
{
SYS_FLAGS f;
 
cprintf("(SEND:COM%d:%d)",port,len);
 
f = kern_fsave();
 
com_irq_disable(port, ALL_IRQ); /* Disable interrupts */
 
/* Transmit first byte of message */
SCom_TX_data.ptr = 0;
SCom_TX_data.len = len;
177,7 → 183,7
if (len < 100) {
memcpy(SCom_TX_data.buf, m, len);
com_write(port, THR, SCom_TX_data.buf[SCom_TX_data.ptr++]);
com_irq_enable(port, THRE_IRQ);
com_irq_enable(port, THRE_IRQ); /* Enable THRE */
}
 
kern_frestore(f);
204,8 → 210,7
 
void RBRF_handler (unsigned port) /* Receive Data Register Full */
{
while ((com_read(port,LSR) & 1) != 0)
SCom_Access.indication(port, com_read(port, RBR));
SCom_Access.indication(port, com_read(port, RBR));
}
 
void LSR_handler (unsigned port) /* break = 8, frame = 4, parity = 2, RBR overrun = 1*/