Commit d4024229 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Report CTS status in FOSSIL driver (high when outbuf has some space)

Some programs (e.g. sbbs.exe v2.30) check for CTS (when configured/enabled for hardware flow control), so reflect the signal (Clear To Send) accurately.
parent 3bfa626d
Pipeline #3010 passed with stage
in 9 minutes and 56 seconds
...@@ -147,6 +147,7 @@ void vdd_getstatus(vdd_status_t* status) ...@@ -147,6 +147,7 @@ void vdd_getstatus(vdd_status_t* status)
memset(status,0,sizeof(vdd_status_t)); memset(status,0,sizeof(vdd_status_t));
} }
#define HAPPY_PORT_STATUS FOSSIL_MDM_STATUS_DCD_CHNG | FOSSIL_MDM_STATUS_DCD | FOSSIL_MDM_STATUS_CTS | FOSSIL_LINE_STATUS_THRE | FOSSIL_LINE_STATUS_TSRE
WORD PortStatus() WORD PortStatus()
{ {
WORD status=FOSSIL_MDM_STATUS_DCD_CHNG; /* AL bit 3 (change in DCD) always set */ WORD status=FOSSIL_MDM_STATUS_DCD_CHNG; /* AL bit 3 (change in DCD) always set */
...@@ -170,6 +171,9 @@ WORD PortStatus() ...@@ -170,6 +171,9 @@ WORD PortStatus()
if(!vdd_status.outbuf_full) /* output buffer is empty */ if(!vdd_status.outbuf_full) /* output buffer is empty */
status|=FOSSIL_LINE_STATUS_TSRE; status|=FOSSIL_LINE_STATUS_TSRE;
if(vdd_status.outbuf_full < vdd_status.outbuf_size)
status|=FOSSIL_MDM_STATUS_CTS;
return(status); return(status);
} }
...@@ -263,7 +267,7 @@ void interrupt winNTint14( ...@@ -263,7 +267,7 @@ void interrupt winNTint14(
break; break;
case FOSSIL_FUNC_GET_STATUS: /* request status */ case FOSSIL_FUNC_GET_STATUS: /* request status */
_ax=PortStatus(); _ax=PortStatus();
if(_ax == FOSSIL_MDM_STATUS_DCD_CHNG | FOSSIL_MDM_STATUS_DCD | FOSSIL_LINE_STATUS_THRE | FOSSIL_LINE_STATUS_TSRE) if(_ax == HAPPY_PORT_STATUS)
vdd_op(VDD_MAYBE_YIELD); vdd_op(VDD_MAYBE_YIELD);
break; break;
case FOSSIL_FUNC_INIT: /* initialize */ case FOSSIL_FUNC_INIT: /* initialize */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment