sketchbook
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Serial.h
Go to the documentation of this file.
1 #ifndef SERIAL_H_
2 #define SERIAL_H_
3 
4 #if defined(MEGA)
5  #define UART_NUMBER 4
6 #elif defined(PROMICRO)
7  #define UART_NUMBER 2
8 #else
9  #define UART_NUMBER 1
10 #endif
11 #define RX_BUFFER_SIZE 256 // 256 RX buffer is needed for GPS communication (64 or 128 was too short)
12 #define TX_BUFFER_SIZE 128
13 
14 void SerialOpen(uint8_t port, uint32_t baud);
15 uint8_t SerialRead(uint8_t port);
16 void SerialWrite(uint8_t port,uint8_t c);
17 uint8_t SerialAvailable(uint8_t port);
18 void SerialEnd(uint8_t port);
19 uint8_t SerialPeek(uint8_t port);
20 bool SerialTXfree(uint8_t port);
21 uint8_t SerialUsedTXBuff(uint8_t port);
22 void SerialSerialize(uint8_t port,uint8_t a);
23 void UartSendData(uint8_t port);
24 
25 void SerialWrite16(uint8_t port, int16_t val);
26 
27 #endif /* SERIAL_H_ */
uint8_t SerialUsedTXBuff(uint8_t port)
Definition: Serial.cpp:228
uint8_t SerialRead(uint8_t port)
Definition: Serial.cpp:190
void UartSendData(uint8_t port)
Definition: Serial.cpp:78
void SerialEnd(uint8_t port)
Definition: Serial.cpp:135
void SerialWrite(uint8_t port, uint8_t c)
Definition: Serial.cpp:239
bool SerialTXfree(uint8_t port)
uint8_t SerialAvailable(uint8_t port)
Definition: Serial.cpp:217
uint8_t SerialPeek(uint8_t port)
void SerialOpen(uint8_t port, uint32_t baud)
Definition: Serial.cpp:113
void SerialWrite16(uint8_t port, int16_t val)
Definition: Protocol.cpp:806
void SerialSerialize(uint8_t port, uint8_t a)
Definition: Serial.cpp:232