Defines | |
#define | SERIAL_BUFFER_SIZE 64 |
Note this size must be a power of 2, i.e. 2, 4, 8, 16, etc. | |
#define | SERIAL_BUFFER_MASK 0x3f |
Mask to wrap around at end of circular buffer. (SERIAL_BUFFER_SIZE - 1). | |
Functions | |
bool_t | serialHasData () |
Determine if the FIFO contains data. | |
void | serialInit () |
Initialize the serial processor. | |
uint8_t | serialRead () |
Get the oldest character from the FIFO. | |
void | serialUpdate () |
Read and store any characters in the PIC serial port in a FIFO. | |
Variables | |
uint8_t | serialHead |
Index to the next free location in the buffer. | |
uint8_t | serialTail |
Index to the next oldest data in the buffer. | |
uint8_t | serialBuffer [SERIAL_BUFFER_SIZE] |
Buffer to hold serial data. |
#define SERIAL_BUFFER_MASK 0x3f |
Mask to wrap around at end of circular buffer. (SERIAL_BUFFER_SIZE - 1).
Referenced by serialRead(), and serialUpdate().
#define SERIAL_BUFFER_SIZE 64 |
Note this size must be a power of 2, i.e. 2, 4, 8, 16, etc.
bool_t serialHasData | ( | ) |
Determine if the FIFO contains data.
References serialHead, and serialTail.
Referenced by gpsUpdate().
void serialInit | ( | ) |
uint8_t serialRead | ( | ) |
Get the oldest character from the FIFO.
References SERIAL_BUFFER_MASK, serialBuffer, serialHead, and serialTail.
Referenced by gpsUpdate().
void serialUpdate | ( | ) |
Read and store any characters in the PIC serial port in a FIFO.
References SERIAL_BUFFER_MASK, serialBuffer, and serialHead.
Referenced by timeUpdate().
uint8_t serialBuffer[SERIAL_BUFFER_SIZE] |
Index to the next free location in the buffer.
Referenced by serialHasData(), serialInit(), serialRead(), and serialUpdate().
Index to the next oldest data in the buffer.
Referenced by serialHasData(), serialInit(), and serialRead().