24#undef SERIAL_LSRMST_ESCAPE
25#undef SERIAL_LSRMST_LSR_DATA
26#undef SERIAL_LSRMST_LSR_NODATA
27#undef SERIAL_LSRMST_MST
28#undef SERIAL_IOC_FCR_FIFO_ENABLE
29#undef SERIAL_IOC_FCR_RCVR_RESET
30#undef SERIAL_IOC_FCR_XMIT_RESET
31#undef SERIAL_IOC_FCR_DMA_MODE
32#undef SERIAL_IOC_FCR_RES1
33#undef SERIAL_IOC_FCR_RES2
34#undef SERIAL_IOC_FCR_RCVR_TRIGGER_LSB
35#undef SERIAL_IOC_FCR_RCVR_TRIGGER_MSB
36#undef SERIAL_IOC_MCR_DTR
37#undef SERIAL_IOC_MCR_RTS
38#undef SERIAL_IOC_MCR_OUT1
39#undef SERIAL_IOC_MCR_OUT2
40#undef SERIAL_IOC_MCR_LOOP
41#undef IOCTL_SERIAL_LSRMST_INSERT
56 static const WCHAR comW[] = {
'C',
'O',
'M',0};
66 if(*
ptr <
'1' || *
ptr >
'9')
73 if(*
ptr !=
':' && *
ptr !=
' ')
148 static const WCHAR stopbits15W[] = {
'1',
'.',
'5',0};
173 static const WCHAR onW[] = {
'o',
'n',0};
174 static const WCHAR offW[] = {
'o',
'f',
'f',0};
301 static const WCHAR baudW[] = {
'b',
'a',
'u',
'd',
'=',0};
302 static const WCHAR parityW[] = {
'p',
'a',
'r',
'i',
't',
'y',
'=',0};
303 static const WCHAR dataW[] = {
'd',
'a',
't',
'a',
'=',0};
304 static const WCHAR stopW[] = {
's',
't',
'o',
'p',
'=',0};
305 static const WCHAR toW[] = {
't',
'o',
'=',0};
306 static const WCHAR xonW[] = {
'x',
'o',
'n',
'=',0};
307 static const WCHAR odsrW[] = {
'o',
'd',
's',
'r',
'=',0};
308 static const WCHAR octsW[] = {
'o',
'c',
't',
's',
'=',0};
309 static const WCHAR dtrW[] = {
'd',
't',
'r',
'=',0};
310 static const WCHAR rtsW[] = {
'r',
't',
's',
'=',0};
311 static const WCHAR idsrW[] = {
'i',
'd',
's',
'r',
'=',0};
497 if(lptimeouts)
timeouts = *lptimeouts;
511 if(lptimeouts) *lptimeouts =
timeouts;
559 DWORD dwBytesReturned;
582 DWORD dwBytesReturned;
605 DWORD dwBytesReturned;
619 ERR(
"Unknown function code (%u)\n",
func);
643 DWORD dwBytesReturned;
666 DWORD dwBytesReturned;
669 &
ss,
sizeof(
ss), &dwBytesReturned,
NULL))
684 memset(lpStat, 0,
sizeof(*lpStat));
721 DWORD dwBytesReturned;
726 &sqs,
sizeof(sqs),
NULL, 0, &dwBytesReturned,
NULL);
746 DWORD dwBytesReturned;
749 NULL, 0, evtmask,
sizeof(*evtmask), &dwBytesReturned,
NULL);
770 DWORD dwBytesReturned;
773 &evtmask,
sizeof(evtmask),
NULL, 0, &dwBytesReturned,
NULL);
778 TRACE(
"bytesize=%d baudrate=%d fParity=%d Parity=%d stopbits=%d\n",
779 lpdcb->ByteSize, lpdcb->BaudRate, lpdcb->fParity, lpdcb->Parity,
782 TRACE(
"%sIXON %sIXOFF\n", (lpdcb->fOutX) ?
"" :
"~", (lpdcb->fInX) ?
"" :
"~");
783 TRACE(
"fOutxCtsFlow=%d fRtsControl=%d\n", lpdcb->fOutxCtsFlow, lpdcb->fRtsControl);
784 TRACE(
"fOutxDsrFlow=%d fDtrControl=%d\n", lpdcb->fOutxDsrFlow, lpdcb->fDtrControl);
813 DWORD dwBytesReturned;
877 &sbr,
sizeof(sbr),
NULL, 0, &dwBytesReturned,
NULL) &&
879 &slc,
sizeof(slc),
NULL, 0, &dwBytesReturned,
NULL) &&
881 &shf,
sizeof(shf),
NULL, 0, &dwBytesReturned,
NULL) &&
883 &sc,
sizeof(sc),
NULL, 0, &dwBytesReturned,
NULL));
910 DWORD dwBytesReturned;
921 NULL, 0, &sbr,
sizeof(sbr), &dwBytesReturned,
NULL) ||
923 NULL, 0, &slc,
sizeof(slc), &dwBytesReturned,
NULL) ||
925 NULL, 0, &shf,
sizeof(shf), &dwBytesReturned,
NULL) ||
927 NULL, 0, &sc,
sizeof(sc), &dwBytesReturned,
NULL))
930 memset(lpdcb, 0,
sizeof(*lpdcb));
1000 DWORD dwBytesReturned;
1002 &chTransmit,
sizeof(chTransmit),
NULL, 0, &dwBytesReturned,
NULL);
1023 DWORD dwBytesReturned;
1025 TRACE(
"(%p, %p)\n", hComm, lptimeouts);
1032 NULL, 0, &st,
sizeof(st), &dwBytesReturned,
NULL))
1065 DWORD dwBytesReturned;
1067 TRACE(
"(%p, %p)\n", hComm, lptimeouts);
1069 if (lptimeouts ==
NULL)
1081 &st,
sizeof(st),
NULL, 0, &dwBytesReturned,
NULL);
1101 DWORD dwBytesReturned;
1103 NULL, 0, lpModemStat,
sizeof(
DWORD), &dwBytesReturned,
NULL);
1194 's',
'e',
'r',
'i',
'a',
'l',
'u',
'i',
'.',
'd',
'l',
'l',0 };
1253 if (hConfigModule) {
1254 pCommConfigDialog = (
void *)
GetProcAddress(hConfigModule,
"drvCommConfigDialogW");
1255 if (pCommConfigDialog) {
1256 res = pCommConfigDialog(lpszDevice,
hWnd, lpCommConfig);
1289 if(lpCommConfig ==
NULL)
1352 lpfnSetDefaultCommConfig = (
void *)
GetProcAddress(hConfigModule,
"drvSetDefaultCommConfigW");
1353 if (lpfnSetDefaultCommConfig)
1354 r = lpfnSetDefaultCommConfig(lpszDevice, lpCommConfig,
dwSize);
1414 if (hConfigModule) {
1415 pGetDefaultCommConfig = (
void *)
GetProcAddress(hConfigModule,
"drvGetDefaultCommConfigW");
1416 if (pGetDefaultCommConfig) {
#define DEBUG_CHANNEL(args)
struct timeout * timeouts
static const WCHAR deviceW[]
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
#define MultiByteToWideChar
static LPCWSTR COMM_ParseStart(LPCWSTR ptr)
static const WCHAR lpszSerialUI[]
BOOL WINAPI GetCommConfig(HANDLE hFile, LPCOMMCONFIG lpCommConfig, LPDWORD lpdwSize)
BOOL WINAPI GetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize)
BOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR devid, LPDCB lpdcb, LPCOMMTIMEOUTS lptimeouts)
BOOL WINAPI SetCommBreak(HANDLE handle)
BOOL WINAPI SetCommTimeouts(HANDLE hComm, LPCOMMTIMEOUTS lptimeouts)
static BOOL COMM_BuildNewCommDCB(LPCWSTR device, LPDCB lpdcb, LPCOMMTIMEOUTS lptimeouts)
LARGE_INTEGER PHYSICAL_ADDRESS
BOOL WINAPI SetupComm(HANDLE handle, DWORD insize, DWORD outsize)
BOOL WINAPI SetCommMask(HANDLE handle, DWORD evtmask)
BOOL WINAPI SetCommState(HANDLE handle, LPDCB lpdcb)
BOOL WINAPI CommConfigDialogW(LPCWSTR lpszDevice, HWND hWnd, LPCOMMCONFIG lpCommConfig)
BOOL WINAPI GetCommState(HANDLE handle, LPDCB lpdcb)
static LPCWSTR COMM_ParseNumber(LPCWSTR ptr, LPDWORD lpnumber)
static BOOL COMM_BuildOldCommDCB(LPCWSTR device, LPDCB lpdcb)
BOOL WINAPI SetDefaultCommConfigW(LPCWSTR lpszDevice, LPCOMMCONFIG lpCommConfig, DWORD dwSize)
BOOL WINAPI GetDefaultCommConfigW(LPCWSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize)
BOOL WINAPI GetCommMask(HANDLE handle, LPDWORD evtmask)
BOOL WINAPI BuildCommDCBA(LPCSTR device, LPDCB lpdcb)
BOOL WINAPI GetCommProperties(HANDLE hFile, LPCOMMPROP lpCommProp)
BOOL WINAPI BuildCommDCBW(LPCWSTR devid, LPDCB lpdcb)
static LPCWSTR COMM_ParseByteSize(LPCWSTR ptr, LPBYTE lpbytesize)
BOOL WINAPI GetCommModemStatus(HANDLE hFile, LPDWORD lpModemStat)
BOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR device, LPDCB lpdcb, LPCOMMTIMEOUTS lptimeouts)
BOOL WINAPI CommConfigDialogA(LPCSTR lpszDevice, HWND hWnd, LPCOMMCONFIG lpCommConfig)
BOOL WINAPI GetCommTimeouts(HANDLE hComm, LPCOMMTIMEOUTS lptimeouts)
BOOL WINAPI EscapeCommFunction(HANDLE handle, DWORD func)
BOOL WINAPI TransmitCommChar(HANDLE hComm, CHAR chTransmit)
BOOL WINAPI SetCommConfig(HANDLE hFile, LPCOMMCONFIG lpCommConfig, DWORD dwSize)
static LPCWSTR COMM_ParseParity(LPCWSTR ptr, LPBYTE lpparity)
BOOL WINAPI SetDefaultCommConfigA(LPCSTR lpszDevice, LPCOMMCONFIG lpCommConfig, DWORD dwSize)
BOOL WINAPI ClearCommBreak(HANDLE handle)
static LPCWSTR COMM_ParseStopBits(LPCWSTR ptr, LPBYTE lpstopbits)
LARGE_INTEGER * PPHYSICAL_ADDRESS
BOOL WINAPI WaitCommEvent(HANDLE hFile, LPDWORD lpdwEvents, LPOVERLAPPED lpOverlapped)
static void dump_dcb(const DCB *lpdcb)
BOOL WINAPI PurgeComm(HANDLE handle, DWORD flags)
static LPCWSTR COMM_ParseOnOff(LPCWSTR ptr, LPDWORD lponoff)
BOOL WINAPI ClearCommError(HANDLE handle, LPDWORD errors, LPCOMSTAT lpStat)
GLdouble GLdouble GLdouble r
const unsigned char size_t insize
unsigned char size_t * outsize
#define SERIAL_DSR_SENSITIVITY
#define SERIAL_ERROR_ABORT
#define SERIAL_CTS_HANDSHAKE
#define SERIAL_DTR_CONTROL
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static DWORD LPSTR PDWORD lpdwSize
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED lpOverlapped
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define IOCTL_SERIAL_SET_CHARS
#define IOCTL_SERIAL_SET_LINE_CONTROL
#define SERIAL_ERROR_QUEUEOVERRUN
#define IOCTL_SERIAL_SET_TIMEOUTS
#define SERIAL_RTS_HANDSHAKE
#define IOCTL_SERIAL_WAIT_ON_MASK
#define IOCTL_SERIAL_IMMEDIATE_CHAR
#define SERIAL_ERROR_CHAR
#define IOCTL_SERIAL_SET_XOFF
#define IOCTL_SERIAL_GET_CHARS
#define SERIAL_DSR_HANDSHAKE
#define SERIAL_TX_WAITING_FOR_CTS
#define SERIAL_DTR_HANDSHAKE
#define SERIAL_TX_WAITING_FOR_XON
#define IOCTL_SERIAL_SET_WAIT_MASK
#define IOCTL_SERIAL_SET_QUEUE_SIZE
#define SERIAL_ERROR_BREAK
#define IOCTL_SERIAL_RESET_DEVICE
#define IOCTL_SERIAL_GET_BAUD_RATE
#define IOCTL_SERIAL_GET_COMMSTATUS
#define SERIAL_TX_WAITING_FOR_DCD
#define SERIAL_TX_WAITING_FOR_DSR
#define IOCTL_SERIAL_GET_WAIT_MASK
#define IOCTL_SERIAL_SET_BREAK_OFF
#define SERIAL_NULL_STRIPPING
#define SERIAL_RTS_CONTROL
#define SERIAL_AUTO_TRANSMIT
#define IOCTL_SERIAL_GET_TIMEOUTS
#define IOCTL_SERIAL_SET_XON
#define IOCTL_SERIAL_CLR_DTR
#define IOCTL_SERIAL_SET_BAUD_RATE
#define SERIAL_ERROR_FRAMING
#define SERIAL_ERROR_PARITY
#define SERIAL_TX_WAITING_XOFF_SENT
#define IOCTL_SERIAL_CLR_RTS
#define SERIAL_AUTO_RECEIVE
#define SERIAL_ERROR_OVERRUN
#define IOCTL_SERIAL_GET_MODEMSTATUS
#define SERIAL_XOFF_CONTINUE
#define IOCTL_SERIAL_GET_LINE_CONTROL
#define IOCTL_SERIAL_SET_DTR
#define IOCTL_SERIAL_SET_BREAK_ON
#define IOCTL_SERIAL_GET_HANDFLOW
#define IOCTL_SERIAL_SET_RTS
#define IOCTL_SERIAL_SET_HANDFLOW
#define IOCTL_SERIAL_PURGE
#define strncmpiW(s1, s2, n)
#define strtoulW(s1, s2, b)
#define strncmpW(s1, s2, n)
DWORD WriteTotalTimeoutConstant
DWORD ReadTotalTimeoutMultiplier
DWORD ReadTotalTimeoutConstant
DWORD ReadIntervalTimeout
DWORD WriteTotalTimeoutMultiplier
ULONG WriteTotalTimeoutMultiplier
ULONG ReadTotalTimeoutConstant
ULONG WriteTotalTimeoutConstant
ULONG ReadTotalTimeoutMultiplier
ULONG ReadIntervalTimeout
static const WCHAR stopW[]
struct _COMM_CONFIG COMMCONFIG
#define PCF_TOTALTIMEOUTS
#define RTS_CONTROL_ENABLE
#define DTR_CONTROL_HANDSHAKE
#define RTS_CONTROL_HANDSHAKE
#define DTR_CONTROL_DISABLE
#define RTS_CONTROL_TOGGLE
#define RTS_CONTROL_DISABLE
#define DTR_CONTROL_ENABLE
_Out_writes_bytes_opt_ lpdwSize LPCOMMCONFIG lpCC
struct _COMM_CONFIG * LPCOMMCONFIG