Remove uart_cts() since the function is defined but never used. Fix Issue 71

This commit is contained in:
Romuald Conty 2010-04-20 08:48:41 +00:00
parent 778ac87b37
commit 2ab522950f

View file

@ -191,13 +191,6 @@ void uart_close(const serial_port sp)
free(sp);
}
bool uart_cts(const serial_port sp)
{
char status;
if (ioctl(((serial_port_unix*)sp)->fd,TIOCMGET,&status) < 0) return false;
return (status & TIOCM_CTS);
}
bool uart_receive(const serial_port sp, byte_t* pbtRx, size_t* pszRxLen)
{
int res;
@ -391,14 +384,6 @@ uint32_t uart_get_speed(const serial_port sp)
return 0;
}
bool uart_cts(const serial_port sp)
{
DWORD ModemStat;
const serial_port_windows* spw = (serial_port_windows*)sp;
if (!GetCommModemStatus(spw->hPort,&ModemStat)) return false;
return (ModemStat & MS_CTS_ON);
}
bool uart_receive(const serial_port sp, byte_t* pbtRx, size_t* pszRxLen)
{
ReadFile(((serial_port_windows*)sp)->hPort,pbtRx,*pszRxLen,(LPDWORD)pszRxLen,NULL);