|
brazos-trapezoidal
|
Header file of SerialBuffer. More...


Go to the source code of this file.
Classes | |
| struct | BUFFER_TYPE |
Enumerations | |
| enum | SERIALBUFFER_TX_STATE_TYPE { SERIALBUFFER_TX_STATE_IDLE , SERIALBUFFER_TX_STATE_LISTEN , SERIALBUFFER_TX_STATE_SENDING , SERIALBUFFER_TX_STATE_ERROR } |
| enum | SERIALBUFFER_RX_STATE_TYPE { SERIALBUFFER_RX_STATE_IDLE , SERIALBUFFER_RX_STATE_RECEIVE_HEADER , SERIALBUFFER_RX_STATE_RECEIVE_DATA , SERIALBUFFER_RX_STATE_ERROR } |
| enum | BUFFER_POS_TYPE { BUFFER_POS_EMPTY , BUFFER_POS_LOADING , BUFFER_POS_FULL , BUFFER_POS_TRANSMITTING } |
Functions | |
| void | SerialBuffer__Initialize (void) |
| It Initializes the module and its variables. More... | |
| BOOL_TYPE | SerialBuffer__U8LoadDatatoBuffer (unsigned char data) |
| Method to load data to the Serial TX Buffer. More... | |
| void | SerialBuffer__HandlerTX (void) |
| Serial Buffer TX Handler. More... | |
| void | SerialBuffer__HandlerRX (void) |
| Serial Buffer RX Handler. More... | |
| void | SerialBuffer__ReadFromBuffer (unsigned char *data, unsigned char num_bytes) |
| Returns the data from the Buffer. More... | |
| BUFFER_POS_TYPE | SerialBuffer__GetTXBufferStatus (unsigned char buffer_pos) |
| Returns the status of the Tx Buffer. More... | |
| bool | SerialBuffer__GetTXBufferIsEmpty (void) |
| Returns if the TX buffer is Empty. More... | |
| BUFFER_POS_TYPE | SerialBuffer__GetRXBufferStatus (unsigned char buffer_pos) |
| Returns the status of the Buffer. More... | |
| unsigned char | SerialBuffer__ReadByteFromBuffer (unsigned char buf_pos, unsigned char index) |
| Sends the SPI data. More... | |
| unsigned char | SerialBuffer__GetTXBufferIndex (void) |
| Returns the Serial Buffer TX index. More... | |
| unsigned char | SerialBuffer__GetRXBufferIndex (void) |
| Returns the Serial Buffer RX index. More... | |
| void | SerialBuffer__Send (void) |
| Method to change the status of a buffer position to full so the handler will send it. More... | |
| BOOL_TYPE | SerialBuffer__NewDataAvailable (void) |
| Returns TRUE_T if there is any new message in the buffer. More... | |
| void | SerialBuffer__NewMessageReceived (void) |
| Method to be called when a new message is received. More... | |
| void | SerialBuffer__DropFrameReceived (void) |
| Method to drop frame receiver per error. More... | |
| void | SerialBuffer__ResetSerialErrorFlags (void) |
| Method to reset the error flags from the serial. More... | |
| enum BUFFER_POS_TYPE |
Definition at line 39 of file SerialBuffer.h.
Definition at line 31 of file SerialBuffer.h.
Definition at line 23 of file SerialBuffer.h.
| void SerialBuffer__DropFrameReceived | ( | void | ) |
Method to drop frame receiver per error.
Definition at line 426 of file SerialBuffer.c.

| unsigned char SerialBuffer__GetRXBufferIndex | ( | void | ) |
Returns the Serial Buffer RX index.
Definition at line 326 of file SerialBuffer.c.
| BUFFER_POS_TYPE SerialBuffer__GetRXBufferStatus | ( | unsigned char | buffer_pos | ) |
Returns the status of the Buffer.
| unsigned | char buffer_pos - buffer index |
Definition at line 284 of file SerialBuffer.c.
| unsigned char SerialBuffer__GetTXBufferIndex | ( | void | ) |
Returns the Serial Buffer TX index.
Definition at line 316 of file SerialBuffer.c.
| bool SerialBuffer__GetTXBufferIsEmpty | ( | void | ) |
| BUFFER_POS_TYPE SerialBuffer__GetTXBufferStatus | ( | unsigned char | buffer_pos | ) |
Returns the status of the Tx Buffer.
| unsigned | char buffer_pos - buffer index |
Definition at line 249 of file SerialBuffer.c.
| void SerialBuffer__HandlerRX | ( | void | ) |
Serial Buffer RX Handler.
Definition at line 185 of file SerialBuffer.c.
| void SerialBuffer__HandlerTX | ( | void | ) |
Serial Buffer TX Handler.
Definition at line 135 of file SerialBuffer.c.
| void SerialBuffer__Initialize | ( | void | ) |
It Initializes the module and its variables.
Definition at line 76 of file SerialBuffer.c.
| BOOL_TYPE SerialBuffer__NewDataAvailable | ( | void | ) |
Returns TRUE_T if there is any new message in the buffer.
Definition at line 336 of file SerialBuffer.c.
| void SerialBuffer__NewMessageReceived | ( | void | ) |
Method to be called when a new message is received.
It will set the estate of the Buffer position as FULL and will increment the Buffer position counter
Definition at line 358 of file SerialBuffer.c.

| unsigned char SerialBuffer__ReadByteFromBuffer | ( | unsigned char | buf_pos, |
| unsigned char | index | ||
| ) |
Sends the SPI data.
| unsigned | char num_of_bytes |
Definition at line 298 of file SerialBuffer.c.
| void SerialBuffer__ReadFromBuffer | ( | unsigned char * | data, |
| unsigned char | buffer_pos | ||
| ) |
Returns the data from the Buffer.
| unsigned | char *data - position to copy the data |
| unsigned | char buffer_pos - buffer index |
Definition at line 233 of file SerialBuffer.c.
| void SerialBuffer__ResetSerialErrorFlags | ( | void | ) |
Method to reset the error flags from the serial.
Definition at line 417 of file SerialBuffer.c.
| void SerialBuffer__Send | ( | void | ) |
Method to change the status of a buffer position to full so the handler will send it.
This is a way to indicate that all data for that position was loaded.
Definition at line 123 of file SerialBuffer.c.
| BOOL_TYPE SerialBuffer__U8LoadDatatoBuffer | ( | unsigned char | data | ) |
Method to load data to the Serial TX Buffer.
| unsigned | char data |
Definition at line 100 of file SerialBuffer.c.