diff --git a/bacnet-stack/ports/linux/dlmstp.c b/bacnet-stack/ports/linux/dlmstp.c index 34a27ed1..58a028a0 100644 --- a/bacnet-stack/ports/linux/dlmstp.c +++ b/bacnet-stack/ports/linux/dlmstp.c @@ -61,7 +61,7 @@ static uint8_t RxBuffer[MAX_MPDU]; /* that a node must wait for a station to begin replying to a */ /* confirmed request: 255 milliseconds. (Implementations may use */ /* larger values for this timeout, not to exceed 300 milliseconds.) */ -static uint8_t Treply_timeout = 260; +static uint16_t Treply_timeout = 260; /* The minimum time without a DataAvailable or ReceiveError event that a */ /* node must wait for a remote node to begin using a token or replying to */ /* a Poll For Master frame: 20 milliseconds. (Implementations may use */ @@ -82,7 +82,7 @@ static void Timer_Silence_Reset( SilenceTime = 0; } -void dlmstp_millisecond_timer( +static void dlmstp_millisecond_timer( void) { INCREMENT_AND_LIMIT_UINT16(SilenceTime); @@ -106,7 +106,7 @@ void get_abstime( abstime->tv_sec += seconds; } -void dlmstp_reinit( +static void dlmstp_reinit( void) { /*RS485_Reinit(); */ @@ -348,7 +348,7 @@ uint16_t MSTP_Get_Send( return pdu_len; } -bool dlmstp_compare_data_expecting_reply( +static bool dlmstp_compare_data_expecting_reply( uint8_t * request_pdu, uint16_t request_pdu_len, uint8_t src_address, diff --git a/bacnet-stack/ports/linux/rs485.c b/bacnet-stack/ports/linux/rs485.c index f2173c7c..5bbae9c6 100644 --- a/bacnet-stack/ports/linux/rs485.c +++ b/bacnet-stack/ports/linux/rs485.c @@ -55,6 +55,7 @@ /* Local includes */ #include "mstp.h" +#include "rs485.h" /* Posix serial programming reference: http://www.easysw.com/~mike/serial/serial.html */ @@ -168,7 +169,7 @@ bool RS485_Set_Baud_Rate( /* Transmits a Frame on the wire */ void RS485_Send_Frame( - struct mstp_port_struct_t *mstp_port, /* port specific data */ + volatile struct mstp_port_struct_t *mstp_port, /* port specific data */ uint8_t * buffer, /* frame to send (up to 501 bytes of data) */ uint16_t nbytes) { /* number of bytes of data (up to 501) */ @@ -209,7 +210,7 @@ void RS485_Send_Frame( /* called by timer, interrupt(?) or other thread */ void RS485_Check_UART_Data( - struct mstp_port_struct_t *mstp_port) + volatile struct mstp_port_struct_t *mstp_port) { uint8_t buf[1]; int count;