1) Created MSTP_Create_And_Send_Frame function.
2) Moved MSTP_Create_Frame call out of rs485.c and into mstp.c 3) Modified all previous calls to RS485_Send_Frame calls to call MSTP_Create_And_Send_Frame instead.
This commit is contained in:
@@ -231,13 +231,4 @@ void MSTP_Millisecond_Timer(struct mstp_port_struct_t *mstp_port);
|
||||
void MSTP_Receive_Frame_FSM(struct mstp_port_struct_t *mstp_port);
|
||||
void MSTP_Master_Node_FSM(struct mstp_port_struct_t *mstp_port);
|
||||
|
||||
unsigned MSTP_Create_Frame(
|
||||
uint8_t *buffer, // where frame is loaded
|
||||
unsigned buffer_len, // amount of space available
|
||||
uint8_t frame_type, // type of frame to send - see defines
|
||||
uint8_t destination, // destination address
|
||||
uint8_t source, // source address
|
||||
uint8_t *data, // any data to be sent - may be null
|
||||
unsigned data_len); // number of bytes of data (up to 501)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user