Fixed compiler warnings when compiled MS/TP datalink on Linux.

This commit is contained in:
skarg
2011-01-14 15:34:28 +00:00
parent 624de45fc8
commit d6e74ba51b
2 changed files with 7 additions and 6 deletions
+4 -4
View File
@@ -61,7 +61,7 @@ static uint8_t RxBuffer[MAX_MPDU];
/* that a node must wait for a station to begin replying to a */ /* that a node must wait for a station to begin replying to a */
/* confirmed request: 255 milliseconds. (Implementations may use */ /* confirmed request: 255 milliseconds. (Implementations may use */
/* larger values for this timeout, not to exceed 300 milliseconds.) */ /* 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 */ /* 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 */ /* 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 */ /* a Poll For Master frame: 20 milliseconds. (Implementations may use */
@@ -82,7 +82,7 @@ static void Timer_Silence_Reset(
SilenceTime = 0; SilenceTime = 0;
} }
void dlmstp_millisecond_timer( static void dlmstp_millisecond_timer(
void) void)
{ {
INCREMENT_AND_LIMIT_UINT16(SilenceTime); INCREMENT_AND_LIMIT_UINT16(SilenceTime);
@@ -106,7 +106,7 @@ void get_abstime(
abstime->tv_sec += seconds; abstime->tv_sec += seconds;
} }
void dlmstp_reinit( static void dlmstp_reinit(
void) void)
{ {
/*RS485_Reinit(); */ /*RS485_Reinit(); */
@@ -348,7 +348,7 @@ uint16_t MSTP_Get_Send(
return pdu_len; return pdu_len;
} }
bool dlmstp_compare_data_expecting_reply( static bool dlmstp_compare_data_expecting_reply(
uint8_t * request_pdu, uint8_t * request_pdu,
uint16_t request_pdu_len, uint16_t request_pdu_len,
uint8_t src_address, uint8_t src_address,
+3 -2
View File
@@ -55,6 +55,7 @@
/* Local includes */ /* Local includes */
#include "mstp.h" #include "mstp.h"
#include "rs485.h"
/* Posix serial programming reference: /* Posix serial programming reference:
http://www.easysw.com/~mike/serial/serial.html */ http://www.easysw.com/~mike/serial/serial.html */
@@ -168,7 +169,7 @@ bool RS485_Set_Baud_Rate(
/* Transmits a Frame on the wire */ /* Transmits a Frame on the wire */
void RS485_Send_Frame( 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) */ uint8_t * buffer, /* frame to send (up to 501 bytes of data) */
uint16_t nbytes) uint16_t nbytes)
{ /* number of bytes of data (up to 501) */ { /* number of bytes of data (up to 501) */
@@ -209,7 +210,7 @@ void RS485_Send_Frame(
/* called by timer, interrupt(?) or other thread */ /* called by timer, interrupt(?) or other thread */
void RS485_Check_UART_Data( void RS485_Check_UART_Data(
struct mstp_port_struct_t *mstp_port) volatile struct mstp_port_struct_t *mstp_port)
{ {
uint8_t buf[1]; uint8_t buf[1];
int count; int count;