Serial ports on the SA1100 (cont’d)
// setup serial port params
sp1->utcr0 = 0x08; // set 8-N-1, asynchronous
sp1->utcr1 &= 0xF0; // clear the last four bits
sp1->utcr1 |= (bdr >> 8); // set the baud rate
sp1->utcr3 = 0x0B; // set various functions (see 11-135 in Developer Manual)
SetIrqLevel( IRQ_UART0, FALSE );
if ( count > oldcount ) {
printf( "received characters %c\n", sp1->utdr );