Fix "BIT_GYRO" definition error. (#8952)
[betaflight.git] / support / stmloader / serial.h
blob90beedc781be779db2998520855300d6f4a108f7
1 /*
2 This file is part of AutoQuad.
4 AutoQuad is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 AutoQuad is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with AutoQuad. If not, see <http://www.gnu.org/licenses/>.
16 Copyright © 2011 Bill Nesbitt
19 #ifndef _serial_h
20 #define _serial_h
22 #define INPUT_BUFFER_SIZE 1024
24 typedef struct {
25 int fd;
26 } serialStruct_t;
28 extern serialStruct_t *initSerial(const char *port, unsigned int baud, char ctsRts);
29 extern void serialWrite(serialStruct_t *s, const char *str, unsigned int len);
30 extern void serialWriteChar(serialStruct_t *s, unsigned char c);
31 extern unsigned char serialAvailable(serialStruct_t *s);
32 extern void serialFlush(serialStruct_t *s);
33 extern unsigned char serialRead(serialStruct_t *s);
34 extern void serialEvenParity(serialStruct_t *s);
35 extern void serialNoParity(serialStruct_t *s);
36 extern void serialFree(serialStruct_t *s);
38 #endif