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
0617b490
Commit
0617b490
authored
Sep 09, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add partial implementation for IOCTL_SERIAL_GET_PROPERTIES.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
01b19b63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
serial.c
dlls/ntdll/serial.c
+33
-0
No files found.
dlls/ntdll/serial.c
View file @
0617b490
...
...
@@ -338,6 +338,31 @@ static NTSTATUS get_modem_status(int fd, DWORD* lpModemStat)
return
status
;
}
static
NTSTATUS
get_properties
(
int
fd
,
SERIAL_COMMPROP
*
prop
)
{
/* FIXME: get actual properties from the device */
memset
(
prop
,
0
,
sizeof
(
*
prop
)
);
prop
->
PacketLength
=
1
;
prop
->
PacketVersion
=
1
;
prop
->
ServiceMask
=
SP_SERIALCOMM
;
prop
->
MaxTxQueue
=
4096
;
prop
->
MaxRxQueue
=
4096
;
prop
->
MaxBaud
=
BAUD_115200
;
prop
->
ProvSubType
=
PST_RS232
;
prop
->
ProvCapabilities
=
PCF_DTRDSR
|
PCF_PARITY_CHECK
|
PCF_RTSCTS
|
PCF_TOTALTIMEOUTS
|
PCF_INTTIMEOUTS
;
prop
->
SettableParams
=
SP_BAUD
|
SP_DATABITS
|
SP_HANDSHAKING
|
SP_PARITY
|
SP_PARITY_CHECK
|
SP_STOPBITS
;
prop
->
SettableBaud
=
BAUD_075
|
BAUD_110
|
BAUD_134_5
|
BAUD_150
|
BAUD_300
|
BAUD_600
|
BAUD_1200
|
BAUD_1800
|
BAUD_2400
|
BAUD_4800
|
BAUD_9600
|
BAUD_19200
|
BAUD_38400
|
BAUD_57600
|
BAUD_115200
;
prop
->
SettableData
=
DATABITS_5
|
DATABITS_6
|
DATABITS_7
|
DATABITS_8
;
prop
->
SettableStopParity
=
STOPBITS_10
|
STOPBITS_15
|
STOPBITS_20
|
PARITY_NONE
|
PARITY_ODD
|
PARITY_EVEN
|
PARITY_MARK
|
PARITY_SPACE
;
prop
->
CurrentTxQueue
=
prop
->
MaxTxQueue
;
prop
->
CurrentRxQueue
=
prop
->
MaxRxQueue
;
return
STATUS_SUCCESS
;
}
static
NTSTATUS
get_special_chars
(
int
fd
,
SERIAL_CHARS
*
sc
)
{
struct
termios
port
;
...
...
@@ -1193,6 +1218,14 @@ static inline NTSTATUS io_control(HANDLE hDevice,
}
else
status
=
STATUS_INVALID_PARAMETER
;
break
;
case
IOCTL_SERIAL_GET_PROPERTIES
:
if
(
lpOutBuffer
&&
nOutBufferSize
==
sizeof
(
SERIAL_COMMPROP
))
{
if
(
!
(
status
=
get_properties
(
fd
,
lpOutBuffer
)))
sz
=
sizeof
(
SERIAL_COMMPROP
);
}
else
status
=
STATUS_INVALID_PARAMETER
;
break
;
case
IOCTL_SERIAL_IMMEDIATE_CHAR
:
if
(
lpInBuffer
&&
nInBufferSize
==
sizeof
(
CHAR
))
status
=
xmit_immediate
(
hDevice
,
fd
,
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