From 19c5a20205f90d07e5ce9d6e282f997467eda769 Mon Sep 17 00:00:00 2001 From: skarg Date: Sat, 7 Oct 2006 14:12:16 +0000 Subject: [PATCH] Converted C++ comments to C comments --- bacnet-stack/ports/pic18/dlmstp.c | 6 ++--- bacnet-stack/ports/pic18/mstp.c | 6 ++--- bacnet-stack/ports/pic18/mstp.h | 2 +- bacnet-stack/ports/pic18/rs485.c | 14 +++++------ bacnet-stack/ports/rtos32/main.c | 36 ++++++++++++++--------------- bacnet-stack/ports/rtos32/rs485.c | 10 ++++---- bacnet-stack/ports/win32/ethernet.c | 8 +++---- 7 files changed, 41 insertions(+), 41 deletions(-) diff --git a/bacnet-stack/ports/pic18/dlmstp.c b/bacnet-stack/ports/pic18/dlmstp.c index 8940742e..38d10400 100644 --- a/bacnet-stack/ports/pic18/dlmstp.c +++ b/bacnet-stack/ports/pic18/dlmstp.c @@ -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; /* receive buffer */ @@ -50,7 +50,7 @@ volatile struct mstp_port_struct_t MSTP_Port; #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 static uint8_t EditField = 0; /* ************************************************************************* @@ -204,7 +204,7 @@ void dlmstp_task(void) /* only do master state machine while rx is idle */ if (MSTP_Port.receive_state == MSTP_RECEIVE_STATE_IDLE) { while (MSTP_Master_Node_FSM(&MSTP_Port)) {}; - //MSTP_Master_Node_FSM(&MSTP_Port); + /*MSTP_Master_Node_FSM(&MSTP_Port); */ } /* see if there is a packet available, and a place to put the reply (if necessary) and process it */ diff --git a/bacnet-stack/ports/pic18/mstp.c b/bacnet-stack/ports/pic18/mstp.c index 834133d4..f5ae29a9 100644 --- a/bacnet-stack/ports/pic18/mstp.c +++ b/bacnet-stack/ports/pic18/mstp.c @@ -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 diff --git a/bacnet-stack/ports/pic18/mstp.h b/bacnet-stack/ports/pic18/mstp.h index cdbb8ce7..7ff3e79e 100644 --- a/bacnet-stack/ports/pic18/mstp.h +++ b/bacnet-stack/ports/pic18/mstp.h @@ -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; diff --git a/bacnet-stack/ports/pic18/rs485.c b/bacnet-stack/ports/pic18/rs485.c index b7a77c52..c4ea6513 100644 --- a/bacnet-stack/ports/pic18/rs485.c +++ b/bacnet-stack/ports/pic18/rs485.c @@ -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; } diff --git a/bacnet-stack/ports/rtos32/main.c b/bacnet-stack/ports/rtos32/main.c index 609ea8eb..37f560c8 100644 --- a/bacnet-stack/ports/rtos32/main.c +++ b/bacnet-stack/ports/rtos32/main.c @@ -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); diff --git a/bacnet-stack/ports/rtos32/rs485.c b/bacnet-stack/ports/rtos32/rs485.c index ef7a7e1b..1007518d 100644 --- a/bacnet-stack/ports/rtos32/rs485.c +++ b/bacnet-stack/ports/rtos32/rs485.c @@ -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; diff --git a/bacnet-stack/ports/win32/ethernet.c b/bacnet-stack/ports/win32/ethernet.c index f28d1403..30be23f6 100644 --- a/bacnet-stack/ports/win32/ethernet.c +++ b/bacnet-stack/ports/win32/ethernet.c @@ -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; }