From 5ca37400b83a080e85d47799f277583e547790f5 Mon Sep 17 00:00:00 2001 From: Oleg Hahm <oleg@hobbykeller.org> Date: Tue, 26 May 2015 19:42:44 +0200 Subject: [PATCH] boards: remove all C++ comments --- boards/avsextrem/include/smb380-board.h | 72 +++++++++---------- boards/avsextrem/include/ssp0-board.h | 8 +-- boards/msb-430/include/board.h | 6 +- .../drivers/include/sht11-board.h | 14 ++-- boards/msba2-common/include/msba2_common.h | 2 +- boards/msba2-common/tools/src/chipinfo.h | 20 +++--- boards/msba2-common/tools/src/control_2xxx.h | 2 +- boards/msba2-common/tools/src/lpc2k_pgm.h | 2 +- boards/msba2-common/tools/src/serial.h | 2 +- boards/redbee-econotag/drivers/include/nvm.h | 2 +- boards/redbee-econotag/include/board.h | 2 +- boards/telosb/include/board.h | 6 +- boards/wsn430-v1_4/include/board.h | 6 +- boards/z1/include/board.h | 8 +-- 14 files changed, 76 insertions(+), 76 deletions(-) diff --git a/boards/avsextrem/include/smb380-board.h b/boards/avsextrem/include/smb380-board.h index b3db576afa..03e0e34dc6 100644 --- a/boards/avsextrem/include/smb380-board.h +++ b/boards/avsextrem/include/smb380-board.h @@ -34,9 +34,9 @@ extern "C" { #define MSG_TYPE_SMB380_WAKEUP 814 -#define SMB380_X_AXIS 0 //X Axis-Name -#define SMB380_Y_AXIS 1 //Y Axis-Name -#define SMB380_Z_AXIS 2 //Z Axis-Name +#define SMB380_X_AXIS 0 /* X Axis-Name */ +#define SMB380_Y_AXIS 1 /* Y Axis-Name */ +#define SMB380_Z_AXIS 2 /* Z Axis-Name */ #define LPM_PREVENT_SLEEP_ACCSENSOR BIT2 @@ -47,8 +47,8 @@ enum SMB380_MODE { SMB380_THRESHOLD, SMB380_FALSEALERT }; -//volatile enum SMB380_MODE -volatile enum SMB380_MODE smb380_mode;// = SMB380_POLL; +/* volatile enum SMB380_MODE */ +volatile enum SMB380_MODE smb380_mode;/* = SMB380_POLL; */ /* Writeable values to EEPROM: from 0x0A (control1) to 0x1D (offset_T). For writing enable ... flag and add eeprom_offset_address. @@ -58,32 +58,32 @@ volatile enum SMB380_MODE smb380_mode;// = SMB380_POLL; */ #define SMB380_EEPROM_OFFSET 0x20 -//Chip-ID Bit0-2, default: 010b +/* Chip-ID Bit0-2, default: 010b */ #define SMB380_CHIP_ID 0x00 -//Chip-ID mask +/* Chip-ID mask */ #define SMB380_CHIP_ID_MASK 0x07 -//ml_version Bit0-3 ; al_version Bit4-7 +/* ml_version Bit0-3 ; al_version Bit4-7 */ #define SMB380_AL_ML_VERSION 0x01 #define SMB380_AL_MASK 0xF0 #define SMB380_ML_MASK 0x0F -//LSB_acc_x Bit6-7; new_data_x Bit0 +/* LSB_acc_x Bit6-7; new_data_x Bit0 */ #define SMB380_ACC_X_LSB_NEWDATA 0x02 -//MSB_acc_x Bit0-7 +/* MSB_acc_x Bit0-7 */ #define SMB380_ACC_X_MSB 0x03 -//LSB_acc_y Bit6-7; new_data_y Bit0 +/* LSB_acc_y Bit6-7; new_data_y Bit0 */ #define SMB380_ACC_Y_LSB_NEWDATA 0x04 -//MSB_acc_y Bit0-7 +/* MSB_acc_y Bit0-7 */ #define SMB380_ACC_Y_MSB 0x05 -//LSB_acc_z Bit6-7; new_data_z Bit0 +/* LSB_acc_z Bit6-7; new_data_z Bit0 */ #define SMB380_ACC_Z_LSB_NEWDATA 0x06 -//MSB_acc_z Bit0-7 +/* MSB_acc_z Bit0-7 */ #define SMB380_ACC_Z_MSB 0x07 #define SMB380_ACC_LSB_MASK 0xC0 #define SMB380_ACC_MSB_MASK 0xFF #define SMB380_ACC_NEWDATA_MASK 0x01 -//Temperature Bit0-7 +/* Temperature Bit0-7 */ #define SMB380_TEMP 0x08 -//Status register, contains six flags +/* Status register, contains six flags */ #define SMB380_STATUS 0x09 #define SMB380_STATUS_ST_RESULT_MASK 0x80 #define SMB380_STATUS_ALERT_PHASE_MASK 0x10 @@ -91,7 +91,7 @@ volatile enum SMB380_MODE smb380_mode;// = SMB380_POLL; #define SMB380_STATUS_HG_LATCHED_MASK 0x04 #define SMB380_STATUS_STATUS_LG_MASK 0x02 #define SMB380_STATUS_STATUS_HG_MASK 0x01 -//Control register - contains seven values, default: x000 0000b +/* Control register - contains seven values, default: x000 0000b */ #define SMB380_CONTROL1 0x0A #define SMB380_CONTROL1_RESET_INT_MASK 0x40 #define SMB380_CONTROL1_UPDATE_MASK 0x20 @@ -100,7 +100,7 @@ volatile enum SMB380_MODE smb380_mode;// = SMB380_POLL; #define SMB380_CONTROL1_SELF_TEST_0_MASK 0x04 #define SMB380_CONTROL1_SOFT_RESET_MASK 0x02 #define SMB380_CONTROL1_SLEEP_MASK 0x01 -//Control register - contains six values, default: x000 0011b +/* Control register - contains six values, default: x000 0011b */ #define SMB380_CONTROL2 0x0B #define SMB380_CONTROL2_ALERT_MASK 0x80 #define SMB380_CONTROL2_ANY_MOTION_MASK 0x40 @@ -108,30 +108,30 @@ volatile enum SMB380_MODE smb380_mode;// = SMB380_POLL; #define SMB380_CONTROL2_COUNTER_LG_MASK 0x0C #define SMB380_CONTROL2_ENABLE_HG_MASK 0x02 #define SMB380_CONTROL2_ENABLE_LG_MASK 0x01 -//default: 20 +/* default: 20 */ #define SMB380_LG_THRES 0x0C -//default: 150 +/* default: 150 */ #define SMB380_LG_DUR 0x0D -//default: 160 +/* default: 160 */ #define SMB380_HG_THRES 0x0E -//default: 150 +/* default: 150 */ #define SMB380_HG_DUR 0x0F -//default: 0 +/* default: 0 */ #define SMB380_ANY_MOTION_THRES 0x10 -//default: 0000 0000b +/* default: 0000 0000b */ #define SMB380_ANY_MOTION_DUR_HYST 0x1 #define SMB380_ANY_MOTION_DUR_MASK 0xC0 #define SMB380_ANY_MOTION_DUR_HG_HYST_MASK 0x38 #define SMB380_ANY_MOTION_DUR_LG_HYST_MASK 0x07 -//default: 162 +/* default: 162 */ #define SMB380_CUST1 0x12 -//default: 13 +/* default: 13 */ #define SMB380_CUST2 0x13 -//default: xxx0 1110b +/* default: xxx0 1110b */ #define SMB380_CONTROL3 0x14 #define SMB380_CONTROL3_RANGE_MASK 0x18 #define SMB380_CONTROL3_BANDWITH_MASK 0x07 -//default: 1000 0000b +/* default: 1000 0000b */ #define SMB380_CONTROL4 0x15 #define SMB380_CONTROL4_SPI4_MASK 0x80 #define SMB380_CONTROL4_ENABLE_ADV_INT_MASK 0x40 @@ -171,9 +171,9 @@ volatile enum SMB380_MODE smb380_mode;// = SMB380_POLL; #define SMB380_BAND_WIDTH_375HZ 0x04 #define SMB380_BAND_WIDTH_750HZ 0x05 #define SMB380_BAND_WIDTH_1500HZ 0x06 -//SMB380_RING_BUFF_SIZE * int16_t (2Byte) * 4 (x,y,z,Temp) = 512 Byte (for 64) +/* SMB380_RING_BUFF_SIZE * int16_t (2Byte) * 4 (x,y,z,Temp) = 512 Byte (for 64) */ #define SMB380_RING_BUFF_SIZE 256 -//TODO chsnge size to 2048 +/* TODO chsnge size to 2048 */ #define SMB380_RING_BUFF_MAX_THREADS 10 #define SMB380_SAMPLE_RATE_MAX 3000 @@ -192,15 +192,15 @@ void SMB380_update_image(void); * enable write to 0x16 to 0x3D **/ void SMB380_enable_eeprom_default(void); -//Example Hysterese function +/* Example Hysterese function */ uint8_t SMB380_HystereseFunctionSample(int16_t *value); -//Simple api for single-sample, single thread interrupt mode +/* Simple api for single-sample, single thread interrupt mode */ uint8_t SMB380_init_simple(uint16_t samplerate, uint8_t bandwidth, uint8_t range); -//Enables Interrupts (normally only once called) +/* Enables Interrupts (normally only once called) */ uint8_t SMB380_init(uint8_t (*func)(int16_t *)); void SMB380_setSampleRate(uint16_t rate); uint16_t SMB380_getSampleRate(void); @@ -214,7 +214,7 @@ uint8_t checkRange(int16_t *value); void SMB380_enableEEPROM(void); void SMB380_disableEEPROM(void); -// getter +/* getter */ float SMB380_getSampleRatio(void); void SMB380_getAcceleration(unsigned char axis, int16_t *pAbs, int16_t *pMg); int16_t SMB380_getTemperature(void); @@ -229,7 +229,7 @@ unsigned char SMB380_readOffsetTemp(uint16_t *offset); unsigned char SMB380_readGain(uint16_t *gain); unsigned char SMB380_readGainTemp(uint16_t *gain); -// setter +/* setter */ void SMB380_setTempOffset(uint16_t offset, uint8_t EEPROM); void SMB380_setWakeUpPause(unsigned char duration); void SMB380_setBandWidth(unsigned char bandWidth); @@ -250,7 +250,7 @@ void SMB380_resetInterruptFlags(void); void SMB380_writeOffset(uint16_t *offset, uint8_t EEPROM); void SMB380_writeOffsetTemp(uint16_t *offset, uint8_t EEPROM); -// stats +/* stats */ void SMB380_ShowMemory(void); void SMB380_Selftest_1(void); diff --git a/boards/avsextrem/include/ssp0-board.h b/boards/avsextrem/include/ssp0-board.h index 3a5212ce10..083b7f2bb3 100644 --- a/boards/avsextrem/include/ssp0-board.h +++ b/boards/avsextrem/include/ssp0-board.h @@ -56,13 +56,13 @@ extern "C" { #define FIFOSIZE 8 /* SSP select pin */ -#define SSP0_SEL 1 << 21 //P1.21 SMB380 +#define SSP0_SEL 1 << 21 /* P1.21 SMB380 */ -#define SSP0_SELN 1 << 16 //P0.16 Nanotron +#define SSP0_SELN 1 << 16 /* P0.16 Nanotron */ /* SSP1 external interrupt Pin (SMB380 specific) */ -#define SMB380_INT1 1 << 1 //P0.1 -#define BMA180_INT1 1 << 8 //P2.8 +#define SMB380_INT1 1 << 1 /* P0.1 */ +#define BMA180_INT1 1 << 8 /* P2.8 */ diff --git a/boards/msb-430/include/board.h b/boards/msb-430/include/board.h index 2bad4640e9..d5ed87b9fa 100644 --- a/boards/msb-430/include/board.h +++ b/boards/msb-430/include/board.h @@ -32,12 +32,12 @@ extern "C" { #endif -// for correct inclusion of <msp430.h> +/* for correct inclusion of <msp430.h> */ #ifndef __MSP430F1612__ #define __MSP430F1612__ #endif -//MSB430 core +/* MSB430 core */ #define MSP430_INITIAL_CPU_SPEED 2457600uL #define F_CPU MSP430_INITIAL_CPU_SPEED #define F_RC_OSCILLATOR 32768 @@ -64,4 +64,4 @@ extern "C" { typedef uint8_t radio_packet_length_t; /** @} */ -#endif // MSB_BOARD_H_ +#endif /* MSB_BOARD_H_ */ diff --git a/boards/msba2-common/drivers/include/sht11-board.h b/boards/msba2-common/drivers/include/sht11-board.h index 1919d0071c..c9d6d019d9 100644 --- a/boards/msba2-common/drivers/include/sht11-board.h +++ b/boards/msba2-common/drivers/include/sht11-board.h @@ -31,13 +31,13 @@ extern "C" { #endif -#define SHT11_SCK_LOW FIO1CLR = BIT25; // serial clock line low -#define SHT11_SCK_HIGH FIO1SET = BIT25; // serial clock line high -#define SHT11_DATA ((FIO1PIN & BIT26) != 0) // read serial I/O -#define SHT11_DATA_LOW (FIO1CLR = BIT26); // serial I/O line low -#define SHT11_DATA_HIGH (FIO1SET = BIT26); // serial I/O line high -#define SHT11_DATA_IN (FIO1DIR &= ~BIT26) // serial I/O as input -#define SHT11_DATA_OUT (FIO1DIR |= BIT26) // serial I/O as output +#define SHT11_SCK_LOW FIO1CLR = BIT25; /* serial clock line low */ +#define SHT11_SCK_HIGH FIO1SET = BIT25; /* serial clock line high */ +#define SHT11_DATA ((FIO1PIN & BIT26) != 0) /* read serial I/O */ +#define SHT11_DATA_LOW (FIO1CLR = BIT26); /* serial I/O line low */ +#define SHT11_DATA_HIGH (FIO1SET = BIT26); /* serial I/O line high */ +#define SHT11_DATA_IN (FIO1DIR &= ~BIT26) /* serial I/O as input */ +#define SHT11_DATA_OUT (FIO1DIR |= BIT26) /* serial I/O as output */ #define SHT11_INIT FIO1DIR |= BIT25; PINSEL3 &= ~(BIT14|BIT15 | BIT16|BIT17); #ifdef __cplusplus diff --git a/boards/msba2-common/include/msba2_common.h b/boards/msba2-common/include/msba2_common.h index 0a0fd71714..9b8d3fada2 100644 --- a/boards/msba2-common/include/msba2_common.h +++ b/boards/msba2-common/include/msba2_common.h @@ -41,4 +41,4 @@ static inline void pllfeed(void) #endif /** @} */ -#endif // MSBA2_COMMON_H_ +#endif /* MSBA2_COMMON_H_ */ diff --git a/boards/msba2-common/tools/src/chipinfo.h b/boards/msba2-common/tools/src/chipinfo.h index 5b575262af..3d29c342ba 100644 --- a/boards/msba2-common/tools/src/chipinfo.h +++ b/boards/msba2-common/tools/src/chipinfo.h @@ -18,19 +18,19 @@ extern char *lpc_return_strings[]; -struct sector_info_struct { // an array of - int address; // where each sector is located - int size; // and how big it is +struct sector_info_struct { /* an array of */ + int address; /* where each sector is located */ + int size; /* and how big it is */ }; struct chip_info_struct { - char *part_number; // human readable part number - char *id_string; // id string sent by "J" command - unsigned int ram_addr; // where to download into RAM - int chunk_size; // download to ram chunk size - int num_sector; // number of flash sectors - struct sector_info_struct *layout; // layout of sectors - const unsigned int *bootprog; // code that boots into user program (NULL = DTR/RTS only) + char *part_number; /* human readable part number */ + char *id_string; /* id string sent by "J" command */ + unsigned int ram_addr; /* where to download into RAM */ + int chunk_size; /* download to ram chunk size */ + int num_sector; /* number of flash sectors */ + struct sector_info_struct *layout; /* layout of sectors */ + const unsigned int *bootprog; /* code that boots into user program (NULL = DTR/RTS only) */ }; extern struct chip_info_struct chip_info[]; diff --git a/boards/msba2-common/tools/src/control_2xxx.h b/boards/msba2-common/tools/src/control_2xxx.h index 9b0598a6fd..54dcdac814 100644 --- a/boards/msba2-common/tools/src/control_2xxx.h +++ b/boards/msba2-common/tools/src/control_2xxx.h @@ -22,4 +22,4 @@ void hard_reset_to_bootloader(void); void hard_reset_to_user_code(void); -#endif // ..._H_ +#endif /* ..._H_ */ diff --git a/boards/msba2-common/tools/src/lpc2k_pgm.h b/boards/msba2-common/tools/src/lpc2k_pgm.h index 28fcff314e..1f6fc0ef9e 100644 --- a/boards/msba2-common/tools/src/lpc2k_pgm.h +++ b/boards/msba2-common/tools/src/lpc2k_pgm.h @@ -27,4 +27,4 @@ void change_baud(const char *baud_name); */ void signal_terminal(void); -#endif // LPC2K_PGM +#endif /* LPC2K_PGM */ diff --git a/boards/msba2-common/tools/src/serial.h b/boards/msba2-common/tools/src/serial.h index 27f0ac3b9b..dc50afad6d 100644 --- a/boards/msba2-common/tools/src/serial.h +++ b/boards/msba2-common/tools/src/serial.h @@ -34,4 +34,4 @@ void set_rts(int val); void set_dtr(int val); void change_baud(const char *baud_name); -#endif // SERIAL_H_ +#endif /* SERIAL_H_ */ diff --git a/boards/redbee-econotag/drivers/include/nvm.h b/boards/redbee-econotag/drivers/include/nvm.h index f08c9fb93c..a4694c000c 100644 --- a/boards/redbee-econotag/drivers/include/nvm.h +++ b/boards/redbee-econotag/drivers/include/nvm.h @@ -62,4 +62,4 @@ extern void(*nvm_setsvar)(uint32_t zero_for_awesome); } #endif -#endif //NVM_H_ +#endif /* NVM_H_ */ diff --git a/boards/redbee-econotag/include/board.h b/boards/redbee-econotag/include/board.h index cd02b15013..516a212c53 100644 --- a/boards/redbee-econotag/include/board.h +++ b/boards/redbee-econotag/include/board.h @@ -27,7 +27,7 @@ extern "C" { #endif -#define F_CPU (24000000) ///< CPU target speed in Hz +#define F_CPU (24000000) /* /< CPU target speed in Hz */ #define CTUNE 0xb #define IBIAS 0x1f diff --git a/boards/telosb/include/board.h b/boards/telosb/include/board.h index 37f148ce37..3176092d82 100644 --- a/boards/telosb/include/board.h +++ b/boards/telosb/include/board.h @@ -30,12 +30,12 @@ extern "C" { #endif -// for correct inclusion of <msp430.h> +/* for correct inclusion of <msp430.h> */ #ifndef __MSP430F1611__ #define __MSP430F1611__ #endif -//TelosB core +/* TelosB core */ #define MSP430_INITIAL_CPU_SPEED 2457600uL #define F_CPU MSP430_INITIAL_CPU_SPEED #define F_RC_OSCILLATOR 32768 @@ -70,4 +70,4 @@ extern "C" { typedef uint8_t radio_packet_length_t; /** @} */ -#endif // TELOSB_BOARD_H_ +#endif /* TELOSB_BOARD_H_ */ diff --git a/boards/wsn430-v1_4/include/board.h b/boards/wsn430-v1_4/include/board.h index f72f7bfee2..f29d73977a 100644 --- a/boards/wsn430-v1_4/include/board.h +++ b/boards/wsn430-v1_4/include/board.h @@ -32,12 +32,12 @@ extern "C" { #endif -// for correct inclusion of <msp430.h> +/* for correct inclusion of <msp430.h> */ #ifndef __MSP430F1611__ #define __MSP430F1611__ #endif -//MSB430 core +/* MSB430 core */ #define MSP430_INITIAL_CPU_SPEED 800000uL #define F_CPU MSP430_INITIAL_CPU_SPEED #define F_RC_OSCILLATOR 32768 @@ -72,4 +72,4 @@ extern "C" { typedef uint8_t radio_packet_length_t; /** @} */ -#endif // WSN_BOARD_H_ +#endif /* WSN_BOARD_H_ */ diff --git a/boards/z1/include/board.h b/boards/z1/include/board.h index 6f3c320736..f317ad23e5 100644 --- a/boards/z1/include/board.h +++ b/boards/z1/include/board.h @@ -40,7 +40,7 @@ extern "C" { #define __MSP430F2617__ #endif -// MSP430 core +/* MSP430 core */ #define MSP430_INITIAL_CPU_SPEED 8000000uL #ifndef F_CPU #define F_CPU MSP430_INITIAL_CPU_SPEED @@ -49,7 +49,7 @@ extern "C" { #define MSP430_HAS_DCOR 0 #define MSP430_HAS_EXTERNAL_CRYSTAL 1 -// LEDs ports +/* LEDs ports */ #define LEDS_PxDIR P5DIR #define LEDS_PxOUT P5OUT #define LEDS_CONF_RED 0x10 @@ -69,7 +69,7 @@ extern "C" { #define LED_BLUE_TOGGLE LEDS_PxOUT ^= LEDS_CONF_BLUE -// User-button port +/* User-button port */ #define USER_BTN_PxIN P2IN #define USER_BTN_MASK 0x20 @@ -83,4 +83,4 @@ typedef uint8_t radio_packet_length_t; #endif /** @} */ -#endif // Z1_BOARD_H_ +#endif /* Z1_BOARD_H_ */ -- GitLab