Converted C++ comments to C comments

This commit is contained in:
skarg
2006-10-07 14:12:16 +00:00
parent 8d9c621e89
commit 19c5a20205
7 changed files with 41 additions and 41 deletions
+3 -3
View File
@@ -36,7 +36,7 @@
#include "npdu.h"
#include "eeprom.h"
// Number of MS/TP Packets Rx/Tx
/* Number of MS/TP Packets Rx/Tx
*/
uint16_t MSTP_Packets = 0;
@@ -50,7 +50,7 @@ volatile struct mstp_port_struct_t MSTP_Port;
#pragma udata
#define INCREMENT_AND_LIMIT_UINT16(x) {if (x < 0xFFFF) x++;}
// This defines the number of edit fields for this module
/* This defines the number of edit fields for this module
*/
#define MAX_EDIT_FIELD 1
@@ -204,7 +204,7 @@ void dlmstp_task(void)
} while (bytes_remaining);
}
/* only do master state machine while rx is idle */
//MSTP_Master_Node_FSM(&MSTP_Port);
if (MSTP_Port.receive_state == MSTP_RECEIVE_STATE_IDLE) {
while (MSTP_Master_Node_FSM(&MSTP_Port)) {};
/*MSTP_Master_Node_FSM(&MSTP_Port);
*/
+3 -3
View File
@@ -766,7 +766,7 @@ bool MSTP_Master_Node_FSM(volatile struct mstp_port_struct_t *mstp_port)
mstp_port->DataLength);
break;
case FRAME_TYPE_BACNET_DATA_EXPECTING_REPLY:
//mstp_port->ReplyPostponedTimer = 0;
/*mstp_port->ReplyPostponedTimer = 0; */
/* indicate successful reception to the higher layers */
dlmstp_put_receive(mstp_port->SourceAddress,
(uint8_t *) & mstp_port->InputBuffer[0],
@@ -1213,12 +1213,12 @@ void MSTP_Init(volatile struct mstp_port_struct_t *mstp_port)
mstp_port->ReceivedValidFrame = false;
mstp_port->RetryCount = 0;
mstp_port->SilenceTimer = 0;
// mstp_port->ReplyPostponedTimer = 0;
/* mstp_port->ReplyPostponedTimer = 0; */
mstp_port->SoleMaster = false;
mstp_port->SourceAddress = 0;
mstp_port->TokenCount = 0;
#if 0
// these are adjustable, so should already be set
/* these are adjustable, so should already be set */
mstp_port->Nmax_info_frames = DEFAULT_MAX_INFO_FRAMES;
mstp_port->Nmax_master = DEFAULT_MAX_MASTER;
#endif
+1 -1
View File
@@ -162,7 +162,7 @@ struct mstp_port_struct_t {
/* Machine when a Data Expecting Reply Answer activity is completed. */
/* note: we always send a reply postponed since a message other than
the reply may be in the transmit queue */
// uint16_t ReplyPostponedTimer;
/* uint16_t ReplyPostponedTimer; */
/* Used to store the Source Address of a received frame. */
uint8_t SourceAddress;
+7 -7
View File
@@ -44,7 +44,7 @@ uint32_t RS485_Baud_Rate = 9600;
/* the ISR and other use this for status and control */
COMSTAT RS485_Comstat;
//#pragma udata MSTPPortData
/*#pragma udata MSTPPortData */
/* the buffer for receiving characters */
volatile uint8_t RS485_Rx_Buffer[MAX_MPDU];
@@ -87,11 +87,11 @@ void RS485_Send_Frame(volatile struct mstp_port_struct_t *mstp_port, /* port
RS485_Comstat.TxHead = 0;
memcpy((void *)&RS485_Tx_Buffer[0], (void *)buffer, nbytes);
//for (i = 0; i < nbytes; i++) {
// /* put the data into the buffer */
// RS485_Tx_Buffer[i] = *buffer;
// buffer++;
//}
/*for (i = 0; i < nbytes; i++) { */
/* /* put the data into the buffer */ */
/* RS485_Tx_Buffer[i] = *buffer; */
/* buffer++; */
/*} */
RS485_Comstat.Tx_Bytes = nbytes;
/* disable the receiver */
PIE3bits.RC2IE = 0;
@@ -205,7 +205,7 @@ void RS485_Interrupt_Tx(void)
/* enable the receiver */
RS485_TX_ENABLE = 0;
RS485_RX_DISABLE = 0;
// FIXME: might not be necessary
/* FIXME: might not be necessary */
PIE3bits.RC2IE = 1;
RCSTA2bits.CREN = 1;
}
+18 -18
View File
@@ -92,7 +92,7 @@ void RTOS_Initialize(void)
(void) kbhit();
RTKernelInit(5); /* get the kernel going */
RTKeybrdInit();
//(void)CPUMoniInit(); /* not needed - just monitor idle task */
/*(void)CPUMoniInit(); /* not needed - just monitor idle task */ */
RTComInit();
ITimerInit();
@@ -100,23 +100,23 @@ void RTOS_Initialize(void)
/* Win32 structured exception - if no handler is
installed, TerminateProcess() will be called,
which will reboot - a good thing in our case. */
RTRaiseCPUException(0); // Divide Error DIV and IDIV instructions.
RTRaiseCPUException(1); // Debug Any code or data reference.
RTRaiseCPUException(2); // NMI
RTRaiseCPUException(3); // Breakpoint INT 3 instruction.
RTRaiseCPUException(4); // Overflow INTO instruction.
RTRaiseCPUException(5); // BOUND Range Exceeded BOUND instruction.
RTRaiseCPUException(6); // Invalid Opcode (Undefined Opcode)
// RTRaiseCPUException(7); // Device Not Available (No Math Coprocessor)
RTRaiseCPUException(8); // Double Fault any exception instruction,NMI,INTR.
RTRaiseCPUException(9); // Co-Processor overrun
RTRaiseCPUException(10); // Invalid TSS Task switch or TSS access.
RTRaiseCPUException(11); // Segment Not Present Loading segment registers
RTRaiseCPUException(12); // Stack Seg Fault Stack ops /SS reg loads.
RTRaiseCPUException(13); // General Protection Any memory reference
RTRaiseCPUException(14); // Page Fault Any memory reference.
RTRaiseCPUException(15); // reserved
RTRaiseCPUException(16); // Floating-Point Error (Math Fault)
RTRaiseCPUException(0); /* Divide Error DIV and IDIV instructions. */
RTRaiseCPUException(1); /* Debug Any code or data reference. */
RTRaiseCPUException(2); /* NMI */
RTRaiseCPUException(3); /* Breakpoint INT 3 instruction. */
RTRaiseCPUException(4); /* Overflow INTO instruction. */
RTRaiseCPUException(5); /* BOUND Range Exceeded BOUND instruction. */
RTRaiseCPUException(6); /* Invalid Opcode (Undefined Opcode) */
/* RTRaiseCPUException(7); // Device Not Available (No Math Coprocessor) */
RTRaiseCPUException(8); /* Double Fault any exception instruction,NMI,INTR. */
RTRaiseCPUException(9); /* Co-Processor overrun */
RTRaiseCPUException(10); /* Invalid TSS Task switch or TSS access. */
RTRaiseCPUException(11); /* Segment Not Present Loading segment registers */
RTRaiseCPUException(12); /* Stack Seg Fault Stack ops /SS reg loads. */
RTRaiseCPUException(13); /* General Protection Any memory reference */
RTRaiseCPUException(14); /* Page Fault Any memory reference. */
RTRaiseCPUException(15); /* reserved */
RTRaiseCPUException(16); /* Floating-Point Error (Math Fault) */
}
/* setup 1ms timer tick */
SetTimerIntVal(1000);
+5 -5
View File
@@ -62,8 +62,8 @@ void RS485_Print_Frame(int port,
uint8_t * buffer, /* frame to send (up to 501 bytes of data) */
uint16_t nbytes)
{
uint16_t i; // byte counter
unsigned long duration; // measures the time from last output to this one
uint16_t i; /* byte counter */
unsigned long duration; /* measures the time from last output to this one */
unsigned long seconds;
unsigned long milliseconds;
@@ -112,9 +112,9 @@ static int TestCOMPort(int Base)
int i;
for (i = 0; i < 256; i++) {
RTOut(Base + 7, (BYTE) i); // write scratch register
RTOut(Base + 1, RTIn(Base + 1)); // read/write IER
if (RTIn(Base + 7) != i) // check scratch register
RTOut(Base + 7, (BYTE) i); /* write scratch register */
RTOut(Base + 1, RTIn(Base + 1)); /* read/write IER */
if (RTIn(Base + 7) != i) /* check scratch register */
return FALSE;
}
return TRUE;
+4 -4
View File
@@ -430,7 +430,7 @@ void ethernet_debug_address(const char *info, BACNET_ADDRESS * dest)
if (info) {
sprintf(msgBuf, "%s", info);
LogError(msgBuf);
} // if
} /* if */
if (dest) {
sprintf(msgBuf,
@@ -439,7 +439,7 @@ void ethernet_debug_address(const char *info, BACNET_ADDRESS * dest)
for (i = 0; i < MAX_MAC_LEN; i++) {
sprintf(msgBuf, "%02X ", (unsigned) dest->mac[i]);
LogInfo(msgBuf);
} // for
} /* for */
LogInfo("\n");
sprintf(msgBuf,
" Net=%hu\n Len=%d\n Adr=", dest->net, dest->len);
@@ -447,9 +447,9 @@ void ethernet_debug_address(const char *info, BACNET_ADDRESS * dest)
for (i = 0; i < MAX_MAC_LEN; i++) {
sprintf(msgBuf, "%02X ", (unsigned) dest->adr[i]);
LogInfo(msgBuf);
} // for
} /* for */
LogInfo("\n");
} // if ( dest )
} /* if ( dest ) */
return;
}