2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
23 #include <netinet/in.h>
27 #define RX_BUFFER_SIZE 1400
28 #define TX_BUFFER_SIZE 1400
32 uint8_t rxBuffer
[RX_BUFFER_SIZE
];
33 uint8_t txBuffer
[TX_BUFFER_SIZE
];
37 pthread_mutex_t txLock
;
38 pthread_mutex_t rxLock
;
44 serialPort_t
*serTcpOpen(int id
, serialReceiveCallbackPtr rxCallback
, void *rxCallbackData
, uint32_t baudRate
, portMode_e mode
, portOptions_e options
);
47 void tcpDataIn(tcpPort_t
*instance
, uint8_t* ch
, int size
);
48 void tcpDataOut(tcpPort_t
*instance
);
50 bool tcpIsStart(void);
51 bool* tcpGetUsed(void);
52 tcpPort_t
* tcpGetPool(void);