Fix serial IRQ mapping for Bush box, add more init debug
- Bush IBX series (and other targets with SMC 669 super I/O) have active-high IRQs which requires remapping. This was incorrectly handled by the driver, causing a lockup when the SerialDriver module was loaded.
- Add more debugging to the 710 (Super I/O) UART init process
This is more of a patch than a fix, as it means the module will be different depending on the platform for which it was built, which is undesirable.
Discussion is welcomed regarding possible improvements, e.g.:
- Easy way: Implement HAL_UARTDevice in the HAL, and have SerialDriver use this to get the device number (IRQ assignment).
- Caveat: this needs to be done in a way that doesn't make DualSerial try to pick up serial port 1.
- Harder way: Move SerialDriver's driver code into the HAL. Get rid of SerialDriver and migrate to DualSerial.
- Caveat: may break backwards compatibility with older applications? (the device names would be Serial1 and Serial2, and Serial would probably go away - so anything opening
devices:Serial
would probably break?) - Side benefit: serial port 1 could be ignored in
DebugTerminal {TRUE}
builds, removing the need to disableSerialDriver
in theComponents
file.
- Caveat: may break backwards compatibility with older applications? (the device names would be Serial1 and Serial2, and Serial would probably go away - so anything opening