Skip to content
Snippets Groups Projects
Commit e46fcce9 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
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 68f61e67
No related branches found
No related tags found
No related merge requests found
......@@ -147,6 +147,7 @@ void vdd_getstatus(vdd_status_t* status)
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 status=FOSSIL_MDM_STATUS_DCD_CHNG; /* AL bit 3 (change in DCD) always set */
......@@ -170,6 +171,9 @@ WORD PortStatus()
if(!vdd_status.outbuf_full) /* output buffer is empty */
status|=FOSSIL_LINE_STATUS_TSRE;
if(vdd_status.outbuf_full < vdd_status.outbuf_size)
status|=FOSSIL_MDM_STATUS_CTS;
return(status);
}
......@@ -263,7 +267,7 @@ void interrupt winNTint14(
break;
case FOSSIL_FUNC_GET_STATUS: /* request status */
_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);
break;
case FOSSIL_FUNC_INIT: /* initialize */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment