task_light_sensor.c
/******************************************************************************
  * Used for debugging prints the OPT3001 Device Id
  ******************************************************************************/
Used for debugging prints the OPT3001 Device Id
Used for debugging prints the OPT3001 Device Id
void print_device_id(){
    xSemaphoreTake(Sem_Console, portMAX_DELAY);
    printf("\n\r");
    char device_id[20];
    sprintf(device_id, "%04x", i2c_read_16(I2C_OPT3001_ADDRESS, I2C_OPT3001_DEVICE_ID));
    printf("DEVICE_ID: \n\r");
    printf(device_id);
    printf("\n\r");
     xSemaphoreGive(Sem_Console);
}
void print_device_id ( ) { xSemaphoreTake ( Sem_Console , portMAX_DELAY ) ; printf ( " \n \r " ) ; char device_id [ 20 ] ; sprintf ( device_id , " " , i2c_read_16 ( I2C_OPT3001_ADDRESS , I2C_OPT3001_DEVICE_ID ) ) ; printf ( " \n \r " ) ; printf ( device_id ) ; printf ( " \n \r " ) ; xSemaphoreGive ( Sem_Console ) ; }
Used for debugging prints the OPT3001 Device Id
Used for debugging prints the OPT3001 Device Id
//i2c_read_16(I2C_OPT3001_ADDRESS, I2C_OPT3001_DEVICE_ID);