FreeCalypso > hg > freecalypso-tools
annotate libserial-linux/nonblock.c @ 674:135de08c5d74
loadtools/flutil.c: build_flashw_hex_string() no longer needed
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 08 Mar 2020 04:18:30 +0000 |
parents | fd7b447b99e3 |
children |
rev | line source |
---|---|
254
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This module contains the set_serial_nonblock() function. |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 */ |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #include <sys/types.h> |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <sys/ioctl.h> |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <unistd.h> |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 extern int target_fd; |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 set_serial_nonblock(state) |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 int state; |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 { |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 ioctl(target_fd, FIONBIO, &state); |
6984b76f3def
beginning of libserial-newlnx: copy of libserial-orig
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 } |