Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
3cbfd5a4
Commit
3cbfd5a4
authored
4 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Add comGet/SetTxFlowControl functions for Win32.
Need *nix implementations now.
parent
28bbd00e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/comio/comio.h
+2
-0
2 additions, 0 deletions
src/comio/comio.h
src/comio/comio_win32.c
+22
-0
22 additions, 0 deletions
src/comio/comio_win32.c
with
24 additions
and
0 deletions
src/comio/comio.h
+
2
−
0
View file @
3cbfd5a4
...
...
@@ -117,6 +117,8 @@ COMIOEXPORT COM_HANDLE COMIOCALL comOpen(const char* device);
COMIOEXPORT
BOOL
COMIOCALL
comClose
(
COM_HANDLE
);
COMIOEXPORT
long
COMIOCALL
comGetBaudRate
(
COM_HANDLE
);
COMIOEXPORT
BOOL
COMIOCALL
comSetBaudRate
(
COM_HANDLE
,
ulong
rate
);
COMIOEXPORT
BOOL
COMIOCALL
comGetTxFlowControl
(
COM_HANDLE
);
COMIOEXPORT
BOOL
COMIOCALL
comSetTxFlowControl
(
COM_HANDLE
,
BOOL
enable
);
COMIOEXPORT
int
COMIOCALL
comGetModemStatus
(
COM_HANDLE
);
COMIOEXPORT
int
COMIOCALL
comRaiseDTR
(
COM_HANDLE
);
COMIOEXPORT
int
COMIOCALL
comLowerDTR
(
COM_HANDLE
);
...
...
This diff is collapsed.
Click to expand it.
src/comio/comio_win32.c
+
22
−
0
View file @
3cbfd5a4
...
...
@@ -112,6 +112,28 @@ BOOL COMIOCALL comSetBaudRate(COM_HANDLE handle, unsigned long rate)
return
SetCommState
(
handle
,
&
dcb
);
}
BOOL
COMIOCALL
comGetTxFlowControl
(
COM_HANDLE
handle
)
{
DCB
dcb
;
if
(
GetCommState
(
handle
,
&
dcb
)
!=
TRUE
)
return
COM_ERROR
;
return
dcb
.
fOutxCtsFlow
;
}
BOOL
COMIOCALL
comSetTxFlowControl
(
COM_HANDLE
handle
,
BOOL
enable
)
{
DCB
dcb
;
if
(
GetCommState
(
handle
,
&
dcb
)
!=
TRUE
)
return
FALSE
;
dcb
.
fOutxCtsFlow
=
enable
;
return
SetCommState
(
handle
,
&
dcb
);
}
int
COMIOCALL
comGetModemStatus
(
COM_HANDLE
handle
)
{
DWORD
status
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment