Cleaned up compiler warnings on Win32 from Borland compiler.
This commit is contained in:
@@ -49,7 +49,7 @@ typedef struct dlmstp_packet {
|
||||
bool ready; /* true if ready to be sent or received */
|
||||
BACNET_ADDRESS address; /* source address */
|
||||
uint8_t frame_type; /* type of message */
|
||||
unsigned pdu_len; /* packet length */
|
||||
uint16_t pdu_len; /* packet length */
|
||||
uint8_t pdu[MAX_MPDU]; /* packet */
|
||||
} DLMSTP_PACKET;
|
||||
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ uint16_t MSTP_Create_Frame(uint8_t * buffer, /* where frame is loaded */
|
||||
{ /* number of bytes of data (up to 501) */
|
||||
uint8_t crc8 = 0xFF; /* used to calculate the crc value */
|
||||
uint16_t crc16 = 0xFFFF; /* used to calculate the crc value */
|
||||
unsigned index = 0; /* used to load the data portion of the frame */
|
||||
uint16_t index = 0; /* used to load the data portion of the frame */
|
||||
|
||||
/* not enough to do a header */
|
||||
if (buffer_len < 8)
|
||||
|
||||
+2
-2
@@ -147,7 +147,7 @@ struct mstp_port_struct_t {
|
||||
/* The number of frames sent by this node during a single token hold. */
|
||||
/* When this counter reaches the value Nmax_info_frames, the node must */
|
||||
/* pass the token. */
|
||||
unsigned FrameCount;
|
||||
uint8_t FrameCount;
|
||||
/* Used to accumulate the CRC on the header of a frame. */
|
||||
uint8_t HeaderCRC;
|
||||
/* Used to store the actual CRC from the header. */
|
||||
@@ -223,7 +223,7 @@ struct mstp_port_struct_t {
|
||||
/* allowable address for master nodes. The value of Max_Master shall be */
|
||||
/* less than or equal to 127. If Max_Master is not writable in a node, */
|
||||
/* its value shall be 127. */
|
||||
unsigned Nmax_master;
|
||||
uint8_t Nmax_master;
|
||||
|
||||
/* An array of octets, used to store octets for transmitting */
|
||||
/* OutputBuffer is indexed from 0 to OutputBufferSize-1. */
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define STRICT 1
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
|
||||
/* Number of MS/TP Packets Rx/Tx */
|
||||
uint16_t MSTP_Packets = 0;
|
||||
@@ -127,6 +128,7 @@ uint16_t dlmstp_receive(
|
||||
uint16_t pdu_len = 0;
|
||||
DWORD wait_status = 0;
|
||||
|
||||
(void)max_pdu;
|
||||
/* see if there is a packet available, and a place
|
||||
to put the reply (if necessary) and process it */
|
||||
wait_status = WaitForSingleObject(Receive_Packet_Flag,timeout);
|
||||
@@ -157,6 +159,7 @@ static void dlmstp_receive_fsm_task(void *pArg)
|
||||
{
|
||||
bool received_frame;
|
||||
|
||||
(void)pArg;
|
||||
(void)SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
|
||||
while (TRUE) {
|
||||
/* only do receive state machine while we don't have a frame */
|
||||
@@ -180,6 +183,7 @@ static void dlmstp_master_fsm_task(void *pArg)
|
||||
{
|
||||
DWORD dwMilliseconds = 0;
|
||||
|
||||
(void)pArg;
|
||||
(void)SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
|
||||
while (TRUE) {
|
||||
switch (MSTP_Port.master_state) {
|
||||
@@ -204,6 +208,7 @@ static void dlmstp_master_fsm_task(void *pArg)
|
||||
|
||||
static void dlmstp_millisecond_task(void *pArg)
|
||||
{
|
||||
(void)pArg;
|
||||
(void)SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
|
||||
for (;;) {
|
||||
dlmstp_millisecond_timer();
|
||||
|
||||
Reference in New Issue
Block a user