Defines | |
#define | SERIAL_BUFFER_SIZE 64 |
Size of serial port FIFO in bytes. It 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] |
Circular buffer (FIFO) to hold serial data. |
#define SERIAL_BUFFER_MASK 0x3f |
Mask to wrap around at end of circular buffer. (SERIAL_BUFFER_SIZE - 1).
Definition at line 1910 of file PicoBeacon.c.
Referenced by serialRead(), and serialUpdate().
#define SERIAL_BUFFER_SIZE 64 |
Size of serial port FIFO in bytes. It must be a power of 2, i.e. 2, 4, 8, 16, etc.
Definition at line 1907 of file PicoBeacon.c.
bool_t serialHasData | ( | ) |
Determine if the FIFO contains data.
Definition at line 1926 of file PicoBeacon.c.
References serialHead, and serialTail.
Referenced by gpsUpdate().
void serialInit | ( | ) |
Initialize the serial processor.
Definition at line 1937 of file PicoBeacon.c.
References serialHead, and serialTail.
Referenced by main().
uint8_t serialRead | ( | ) |
Get the oldest character from the FIFO.
Definition at line 1948 of file PicoBeacon.c.
References SERIAL_BUFFER_MASK, serialBuffer, serialHead, serialTail, and value.
Referenced by gpsUpdate().
void serialUpdate | ( | ) |
Read and store any characters in the PIC serial port in a FIFO.
Definition at line 1968 of file PicoBeacon.c.
References SERIAL_BUFFER_MASK, serialBuffer, and serialHead.
Referenced by timeUpdate().
uint8_t serialBuffer[SERIAL_BUFFER_SIZE] |
Circular buffer (FIFO) to hold serial data.
Definition at line 1919 of file PicoBeacon.c.
Referenced by serialRead(), and serialUpdate().
Index to the next free location in the buffer.
Definition at line 1913 of file PicoBeacon.c.
Referenced by serialHasData(), serialInit(), serialRead(), and serialUpdate().
Index to the next oldest data in the buffer.
Definition at line 1916 of file PicoBeacon.c.
Referenced by serialHasData(), serialInit(), and serialRead().