|
|
@@ -63,10 +63,10 @@ void pi_i2c_mcu(){
|
|
|
while(DL_I2C_transmitTargetDataCheck(I2C_0_INST, 0x00)!= false);
|
|
|
}
|
|
|
//bitmasked GET command:
|
|
|
- else if((receivedCommand & 0xF0)== 0x20){
|
|
|
- //I2Ctools command: i2cget -y 1 0x20 0x20 i 7
|
|
|
- //Get Battery Measurement data for slot_id: Voltage, Current, Tempertaure
|
|
|
- uint8_t requestedSlot = receivedCommand & 0x0F;
|
|
|
+ else if((receivedCommand & 0x0F)== 0x02){
|
|
|
+ //I2Ctools command: i2cget -y 1 0x20 0xn2 i 7
|
|
|
+ //Get Battery Measurement data for slot_id: Voltage, Current, Temperture
|
|
|
+ uint8_t requestedSlot = (receivedCommand & 0xF0)>>4;
|
|
|
printf("Requested slot:%d\n", requestedSlot);
|
|
|
BatteryData battery_measure;
|
|
|
if(requestedSlot >= NUM_SLOTS){
|