diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-31 09:17:08 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-31 09:17:08 +0000 |
commit | b58117763064615d8d480f3c847ea3d41fe49b81 (patch) | |
tree | d8030775caaac90bdf26095a89f056b6a1d8dd51 | |
parent | 2234fd3e31d4ce6e2b3990340b52719951e65731 (diff) | |
download | ChibiOS-b58117763064615d8d480f3c847ea3d41fe49b81.tar.gz ChibiOS-b58117763064615d8d480f3c847ea3d41fe49b81.tar.bz2 ChibiOS-b58117763064615d8d480f3c847ea3d41fe49b81.zip |
I2C. Testhal comment cleaned.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3693 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | testhal/STM32F1xx/I2C/i2c_pns.c | 2 | ||||
-rw-r--r-- | testhal/STM32F1xx/I2C/lis3.c | 2 | ||||
-rw-r--r-- | testhal/STM32F1xx/I2C/main.c | 34 |
3 files changed, 19 insertions, 19 deletions
diff --git a/testhal/STM32F1xx/I2C/i2c_pns.c b/testhal/STM32F1xx/I2C/i2c_pns.c index b773846ba..94bc13da6 100644 --- a/testhal/STM32F1xx/I2C/i2c_pns.c +++ b/testhal/STM32F1xx/I2C/i2c_pns.c @@ -45,7 +45,7 @@ void I2CInit_pns(void){ /* startups. Pauses added just to be safe */
chThdSleepMilliseconds(100);
-// init_lis3();
+ /*init_lis3();*/
}
diff --git a/testhal/STM32F1xx/I2C/lis3.c b/testhal/STM32F1xx/I2C/lis3.c index 6f697f8f7..17b1456ec 100644 --- a/testhal/STM32F1xx/I2C/lis3.c +++ b/testhal/STM32F1xx/I2C/lis3.c @@ -68,7 +68,7 @@ int init_lis3(void){ *
*/
void request_acceleration_data(void){
- accel_tx_data[0] = ACCEL_OUT_DATA | AUTO_INCREMENT_BIT; // register address
+ accel_tx_data[0] = ACCEL_OUT_DATA | AUTO_INCREMENT_BIT; /* register address */
i2cAcquireBus(&I2CD1);
i2cMasterTransmit(&I2CD1, lis3_addr, accel_tx_data, 1, accel_rx_data, 6, &errors, TIME_INFINITE);
i2cReleaseBus(&I2CD1);
diff --git a/testhal/STM32F1xx/I2C/main.c b/testhal/STM32F1xx/I2C/main.c index 760cee229..c4581ddf6 100644 --- a/testhal/STM32F1xx/I2C/main.c +++ b/testhal/STM32F1xx/I2C/main.c @@ -48,17 +48,17 @@ static msg_t Blink(void *arg) { /*
* Accelerometer thread
*/
-//static WORKING_AREA(PollAccelThreadWA, 256);
-//static msg_t PollAccelThread(void *arg) {
-// chRegSetThreadName("PollAccel");
-// (void)arg;
-// while (TRUE) {
-//// chThdSleepMilliseconds(rand() & 31);
-// chThdSleepMilliseconds(32);
-// request_acceleration_data();
-// }
-// return 0;
-//}
+/*static WORKING_AREA(PollAccelThreadWA, 256);
+static msg_t PollAccelThread(void *arg) {
+ chRegSetThreadName("PollAccel");
+ (void)arg;
+ while (TRUE) {
+ chThdSleepMilliseconds(rand() & 31);
+ chThdSleepMilliseconds(32);
+ request_acceleration_data();
+ }
+ return 0;
+}*/
/* Temperature polling thread */
@@ -67,7 +67,7 @@ static msg_t PollTmp75Thread(void *arg) { chRegSetThreadName("PollTmp75");
(void)arg;
while (TRUE) {
-// chThdSleepMilliseconds(rand() & 31);
+ /*chThdSleepMilliseconds(rand() & 31);*/
chThdSleepMilliseconds(15);
/* Call reading function */
request_temperature();
@@ -103,11 +103,11 @@ int main(void) { I2CInit_pns();
/* Create accelerometer thread */
-// chThdCreateStatic(PollAccelThreadWA,
-// sizeof(PollAccelThreadWA),
-// NORMALPRIO,
-// PollAccelThread,
-// NULL);
+ /*chThdCreateStatic(PollAccelThreadWA,
+ sizeof(PollAccelThreadWA),
+ NORMALPRIO,
+ PollAccelThread,
+ NULL);*/
/* Create temperature thread */
chThdCreateStatic(PollTmp75ThreadWA,
|