Serial ports on the SA1100
A program to test the serial port.
unsigned serialGetBaudRateDivisor(unsigned br)
return((((3686400/(16*br))-1) & 0x0FFF));
__irq void Serial_Handler( void ) {
unsigned* icip = (unsigned *)IC_BASE;
struct sp_regs * sp1 = (struct sp_regs *)SP1_BASE;
// respond to only serial port 1 interrupts
if ( ((*icip) & 0x00008000) != 0 ) {
// clear appropriate status bits