Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
3c2abaf4
Commit
3c2abaf4
authored
Feb 06, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implemented IOCTL for char transmission: IMMEDIATE_CHAR.
parent
5973955e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
10 deletions
+22
-10
comm.c
dlls/kernel/comm.c
+7
-10
serial.c
dlls/ntdll/serial.c
+15
-0
No files found.
dlls/kernel/comm.c
View file @
3c2abaf4
...
...
@@ -1652,23 +1652,20 @@ BOOL WINAPI GetCommState(
* Transmits a single character in front of any pending characters in the
* output buffer. Usually used to send an interrupt character to a host.
*
* PARAMS
* hComm [in] The communication device in need of a command character
* chTransmit [in] The character to transmit
*
* RETURNS
*
* True if the call succeeded, false if the previous command character to the
* same device has not been sent yet the handle is bad etc.
*
* BUGS
*
* Stub.
*/
BOOL
WINAPI
TransmitCommChar
(
HANDLE
hComm
,
/* [in] The communication device in need of a command character. */
CHAR
chTransmit
)
/* [in] The character to transmit. */
BOOL
WINAPI
TransmitCommChar
(
HANDLE
hComm
,
CHAR
chTransmit
)
{
DWORD
w
;
WARN
(
"(%p,'%c') not perfect!
\n
"
,
hComm
,
chTransmit
);
return
WriteFile
(
hComm
,
&
chTransmit
,
1
,
&
w
,
NULL
);
return
DeviceIoControl
(
hComm
,
IOCTL_SERIAL_IMMEDIATE_CHAR
,
&
chTransmit
,
sizeof
(
chTransmit
),
NULL
,
0
,
NULL
,
NULL
);
}
...
...
dlls/ntdll/serial.c
View file @
3c2abaf4
...
...
@@ -211,6 +211,15 @@ static NTSTATUS set_wait_mask(HANDLE hDevice, DWORD mask)
return
status
;
}
static
NTSTATUS
xmit_immediate
(
HANDLE
hDevice
,
int
fd
,
char
*
ptr
)
{
/* FIXME: not perfect as it should bypass the in-queue */
WARN
(
"(%p,'%c') not perfect!
\n
"
,
hDevice
,
*
ptr
);
if
(
write
(
fd
,
ptr
,
1
)
!=
1
)
return
FILE_GetNtStatus
();
return
STATUS_SUCCESS
;
}
/******************************************************************
* COMM_DeviceIoControl
*
...
...
@@ -255,6 +264,12 @@ NTSTATUS COMM_DeviceIoControl(HANDLE hDevice,
else
status
=
STATUS_INVALID_PARAMETER
;
break
;
case
IOCTL_SERIAL_IMMEDIATE_CHAR
:
if
(
lpInBuffer
&&
nInBufferSize
==
sizeof
(
CHAR
))
status
=
xmit_immediate
(
hDevice
,
fd
,
lpInBuffer
);
else
status
=
STATUS_INVALID_PARAMETER
;
break
;
case
IOCTL_SERIAL_PURGE
:
if
(
lpInBuffer
&&
nInBufferSize
==
sizeof
(
DWORD
))
status
=
purge
(
fd
,
*
(
DWORD
*
)
lpInBuffer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment