diff options
Diffstat (limited to 'testhal/STM32F1xx')
-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,
|