• Robert Sprowson's avatar
    Fix OS_SerialOp default handshaking use on Pi · 0b2f7c19
    Robert Sprowson authored
    The default state for the Serial device (aka OS_SerialOp, and redirection to serial via *FX) is to expect hardware handshaking. However the implementation of HAL_UARTModemStatus when ModemControl = {FALSE} state didn't set a return value so ended up returning a1 = the port number (=0) rather than valid status bits. In turn, DualSerial took that to mean CTS/DSR deasserted and refused to send anything.
    To a lesser extent HAL_UARTModemControl also affected, returning a1 = port number 0 too.
    For both, set a return value; the value is as though a cable is always present with RTS=CTS and DTR=DSR.
    
    Also, fix the bugs in ModemControl = {TRUE}. This also fakes DTR=DSR which status/control bits don't appear to be implemented in the UART peripheral. Tested briefly, checking CTS state when plugging/unplugging a cable.
    
    Version 0.82. Tagged as 'HAL_BCM2835-0_82'
    0b2f7c19
VersionNum 687 Bytes