Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mart Lubbers
CleanSerial
Commits
ce8c8653
Commit
ce8c8653
authored
Sep 03, 2018
by
Mart Lubbers
Browse files
Merge branch 'master' into 'master'
Fixed input buffer VMIN value See merge request
!4
parents
cb126d17
73332929
Changes
1
Hide whitespace changes
Inline
Side-by-side
POSIX/tty.c
View file @
ce8c8653
...
...
@@ -149,12 +149,11 @@ void ttyopen(CleanString fn, int baudrate, int bytesize, int parity,
//Set
tio
.
c_oflag
=
0
;
tio
.
c_lflag
&=
~
(
ECHO
|
ECHONL
|
ICANON
|
IEXTEN
|
ISIG
);
// tio.c_lflag |= ICANON;
#ifdef __APPLE__
tio
.
c_cflag
|=
CLOCAL
;
#endif
tio
.
c_cc
[
VMIN
]
=
5
;
tio
.
c_cc
[
VMIN
]
=
1
;
tio
.
c_cc
[
VTIME
]
=
0
;
tcsetattr
(
*
fd
,
TCSANOW
,
&
tio
);
...
...
@@ -215,7 +214,7 @@ int ttywrite(CleanString s, int fd)
int
i
;
for
(
i
=
0
;
i
<
CleanStringLength
(
s
);
i
++
){
unsigned
char
c
=
((
unsigned
char
*
)
CleanStringCharacters
(
s
))[
i
];
printf
(
"%02x(%u) "
,
c
,
c
);
//
printf("%02x(%u) ", c, c);
}
write
(
fd
,
(
void
*
)
CleanStringCharacters
(
s
),
CleanStringLength
(
s
));
tcdrain
(
fd
);
...
...
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