13#ifndef SOURCE_SERIALBUFFER_H_
14 #define SOURCE_SERIALBUFFER_H_
25 SERIALBUFFER_TX_STATE_IDLE,
33 SERIALBUFFER_RX_STATE_IDLE,
44 BUFFER_POS_TRANSMITTING
49unsigned char Num_Bytes;
51BUFFER_POS_TYPE Pos_Status;
void SerialBuffer__ResetSerialErrorFlags(void)
Method to reset the error flags from the serial.
void SerialBuffer__NewMessageReceived(void)
Method to be called when a new message is received.
void SerialBuffer__DropFrameReceived(void)
Method to drop frame receiver per error.
BUFFER_POS_TYPE SerialBuffer__GetRXBufferStatus(unsigned char buffer_pos)
Returns the status of the Buffer.
unsigned char SerialBuffer__GetRXBufferIndex(void)
Returns the Serial Buffer RX index.
void SerialBuffer__ReadFromBuffer(unsigned char *data, unsigned char num_bytes)
Returns the data from the Buffer.
bool SerialBuffer__GetTXBufferIsEmpty(void)
Returns if the TX buffer is Empty.
BOOL_TYPE SerialBuffer__NewDataAvailable(void)
Returns TRUE_T if there is any new message in the buffer.
SERIALBUFFER_TX_STATE_TYPE
@ SERIALBUFFER_TX_STATE_SENDING
In this state Node will check if line is free to start transmission.
@ SERIALBUFFER_TX_STATE_ERROR
Is waiting for all bytes of the position to be transmitted.
@ SERIALBUFFER_TX_STATE_LISTEN
Will check for buffer position not empty.
SERIALBUFFER_RX_STATE_TYPE
@ SERIALBUFFER_RX_STATE_RECEIVE_HEADER
Will check for buffer position not empty.
@ SERIALBUFFER_RX_STATE_ERROR
Is waiting for all bytes of the position to be transmitted.
@ SERIALBUFFER_RX_STATE_RECEIVE_DATA
In this state Node will check if line is free to start transmission.
void SerialBuffer__HandlerRX(void)
Serial Buffer RX Handler.
BUFFER_POS_TYPE SerialBuffer__GetTXBufferStatus(unsigned char buffer_pos)
Returns the status of the Tx Buffer.
void SerialBuffer__Send(void)
Method to change the status of a buffer position to full so the handler will send it.
void SerialBuffer__Initialize(void)
It Initializes the module and its variables.
unsigned char SerialBuffer__ReadByteFromBuffer(unsigned char buf_pos, unsigned char index)
Sends the SPI data.
void SerialBuffer__HandlerTX(void)
Serial Buffer TX Handler.
unsigned char SerialBuffer__GetTXBufferIndex(void)
Returns the Serial Buffer TX index.
BOOL_TYPE SerialBuffer__U8LoadDatatoBuffer(unsigned char data)
Method to load data to the Serial TX Buffer.
Serial Buffer parameter file.
#define SERIAL_BUFFER_SLOT_SIZE
Contains generic typedefs that are able to change in case of different processors.