Pārlūkot izejas kodu

I2C HAL communication

namrota ghosh 6 mēneši atpakaļ
vecāks
revīzija
e205c5c417
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/i2c_comm/i2c_hal.c

+ 2 - 2
src/i2c_comm/i2c_hal.c

@@ -29,7 +29,7 @@ static bool i2c_write(uint8_t const i2c_address, uint8_t *data, uint8_t data_len
     //Trap the Error if the address is not acknowledeged by the Target:
     if (DL_I2C_getControllerStatus(I2C_1_INST) & DL_I2C_CONTROLLER_STATUS_ADDR_ACK) {
         printf("I2C Write Error: Target Address not acknowledged!\n");
-        __BKPT(0);  //for testing
+        __BKPT(0);  //for testing; remove in production
         return false;
     }
 
@@ -63,7 +63,7 @@ static bool i2c_read(uint8_t const i2c_address){
     //Trap the Error if the address is not acknowledeged by the Target:
     if (DL_I2C_getControllerStatus(I2C_1_INST) & DL_I2C_CONTROLLER_STATUS_ADDR_ACK) {
         printf("I2C Write Error: Target Address not acknowledged!\n");
-        __BKPT(0); //for testing
+        __BKPT(0); //for testing; remove in production
         return false;
     }