aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/I2C/max1236.c
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-06-24 10:36:41 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-06-24 10:36:41 +0000
commit73ce7b4fe096f227fbabbe471a283f1b916383fb (patch)
treeb1438dbe42067257e464a5630471ede88fda48a4 /testhal/STM32/I2C/max1236.c
parentd2b62026fc589cb36955d173417c0741edea4b4a (diff)
downloadChibiOS-73ce7b4fe096f227fbabbe471a283f1b916383fb.tar.gz
ChibiOS-73ce7b4fe096f227fbabbe471a283f1b916383fb.tar.bz2
ChibiOS-73ce7b4fe096f227fbabbe471a283f1b916383fb.zip
I2C. Commets in examples changed to /**/
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3077 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/I2C/max1236.c')
-rw-r--r--testhal/STM32/I2C/max1236.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/testhal/STM32/I2C/max1236.c b/testhal/STM32/I2C/max1236.c
index 7ea184b14..13779b99a 100644
--- a/testhal/STM32/I2C/max1236.c
+++ b/testhal/STM32/I2C/max1236.c
@@ -10,10 +10,10 @@
#include "max1236.h"
-// Data buffers
+/* Data buffers */
static i2cblock_t max1236_rx_data[MAX1236_RX_DEPTH];
static i2cblock_t max1236_tx_data[MAX1236_TX_DEPTH];
-// ADC results
+/* ADC results */
static uint16_t ch1 = 0, ch2 = 0, ch3 = 0, ch4 = 0;
@@ -37,7 +37,7 @@ static void i2c_max1236_cb(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg){
}
-// ADC maxim MAX1236 config
+/* ADC maxim MAX1236 config */
static const I2CSlaveConfig max1236 = {
i2c_max1236_cb,
@@ -56,11 +56,11 @@ void init_max1236(void){
/* this data we must send via IC to setup ADC */
#define RXBYTES 0
#define TXBYTES 2
- max1236.txbuf[0] = 0b10000011; // config register content. Consult datasheet
- max1236.txbuf[1] = 0b00000111; // config register content. Consult datasheet
+ max1236.txbuf[0] = 0b10000011; /* config register content. Consult datasheet */
+ max1236.txbuf[1] = 0b00000111; /* config register content. Consult datasheet */
- // transmit out 2 bytes
+ /* transmit out 2 bytes */
i2cAcquireBus(&I2CD2);
i2cMasterTransmit(&I2CD2, &max1236, max1236_addr, TXBYTES, RXBYTES);
while(I2CD2.id_state != I2C_READY){