Elite 1.4 I2C test

This commit is contained in:
YiChin
2019-07-24 14:11:21 +08:00
parent e63af33723
commit 9cac8694c0
2 changed files with 7 additions and 5 deletions
@@ -54,7 +54,7 @@ static void I2Cinit(){
}
// Open I2C
I2Chandle = I2C_open(Board_I2C, &I2Cparams);
// I2Chandle = I2C_open(Board_I2C, &I2Cparams);
}
#define WriteMem 0b10100001
@@ -72,7 +72,7 @@ static void I2CWrite(uint8_t addr, uint8_t data){
I2Chandle = I2C_open(Board_I2C, &I2Cparams);
I2C_transfer(I2Chandle, &i2cTrans);
I2C_close();
I2C_close(I2Chandle);
}
@@ -87,7 +87,7 @@ static void I2CRead(uint8_t addr){
I2Chandle = I2C_open(Board_I2C, &I2Cparams);
I2C_transfer(I2Chandle, &i2cTrans);
I2C_close();
I2C_close(I2Chandle);
}
@@ -621,8 +621,10 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
PIN_setOutputValue(pin_handle, shutdown_6994, 0); // OFF = 1 => turn off 6994
#ifdef Elite1_4
I2Cinit();
I2C_close();
// SPI_close(spiHandle0);
// I2Cinit();
// I2C_close(I2Chandle);
// spiHandle0 = SPI_open(Board_SPI0, &spiParams0); // LED SPI
#endif
counter6994 ++;
}