Added MSTP extended frame transmit. (#531)

* Added MSTP extended frame transmit to bacnet/datalink/mstp.c and ports/stm32f4xx/dlmstp.c modules.

* Changed RS485_Send_Frame to MSTP_Send_Frame in mstp.c

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2023-11-12 09:49:37 -06:00
committed by GitHub
parent 1372e52aa7
commit 3c94580bee
16 changed files with 391 additions and 84 deletions
+16
View File
@@ -164,6 +164,7 @@ static uint32_t Timer_Silence(void *pArg)
struct timespec now, diff;
int32_t res;
(void)pArg;
clock_gettime(CLOCK_MONOTONIC, &now);
timespec_subtract(&diff, &now, &start);
res = ((diff.tv_sec) * 1000 + (diff.tv_nsec) / 1000000);
@@ -173,6 +174,7 @@ static uint32_t Timer_Silence(void *pArg)
static void Timer_Silence_Reset(void *pArg)
{
(void)pArg;
clock_gettime(CLOCK_MONOTONIC, &start);
}
@@ -412,6 +414,20 @@ uint16_t MSTP_Get_Send(
return pdu_len;
}
/**
* @brief Send an MSTP frame
* @param mstp_port - port specific data
* @param buffer - data to send
* @param nbytes - number of bytes of data to send
*/
void MSTP_Send_Frame(
volatile struct mstp_port_struct_t *mstp_port,
uint8_t * buffer,
uint16_t nbytes)
{
RS485_Send_Frame(mstp_port, buffer, nbytes);
}
static bool dlmstp_compare_data_expecting_reply(uint8_t *request_pdu,
uint16_t request_pdu_len,
uint8_t src_address,
+14
View File
@@ -384,6 +384,20 @@ uint16_t MSTP_Get_Send(
return pdu_len;
}
/**
* @brief Send an MSTP frame
* @param mstp_port - port specific data
* @param buffer - data to send
* @param nbytes - number of bytes of data to send
*/
void MSTP_Send_Frame(
volatile struct mstp_port_struct_t *mstp_port,
uint8_t * buffer,
uint16_t nbytes)
{
RS485_Send_Frame(mstp_port, buffer, nbytes);
}
bool dlmstp_compare_data_expecting_reply(uint8_t *request_pdu,
uint16_t request_pdu_len,
uint8_t src_address,
+16
View File
@@ -100,6 +100,22 @@ uint16_t MSTP_Get_Send(
return 0;
}
/**
* @brief Send an MSTP frame
* @param mstp_port - port specific data
* @param buffer - data to send
* @param nbytes - number of bytes of data to send
*/
void MSTP_Send_Frame(
volatile struct mstp_port_struct_t *mstp_port,
uint8_t * buffer,
uint16_t nbytes)
{
(void)mstp_port;
(void)buffer;
(void)nbytes;
}
uint16_t MSTP_Get_Reply(
volatile struct mstp_port_struct_t *mstp_port, unsigned timeout)
{ /* milliseconds to wait for a packet */
+16
View File
@@ -125,6 +125,22 @@ uint16_t MSTP_Get_Send(
return 0;
}
/**
* @brief Send an MSTP frame
* @param mstp_port - port specific data
* @param buffer - data to send
* @param nbytes - number of bytes of data to send
*/
void MSTP_Send_Frame(
volatile struct mstp_port_struct_t *mstp_port,
uint8_t * buffer,
uint16_t nbytes)
{
(void)mstp_port;
(void)buffer;
(void)nbytes;
}
uint16_t MSTP_Get_Reply(
volatile struct mstp_port_struct_t *mstp_port, unsigned timeout)
{ /* milliseconds to wait for a packet */