/* Step #3 Already Implemented */ /* Wait for log queue filling */ if(uxQueueMessagesWaiting(SDcardQueueHandle) != 0) { /* Read from message queue */ if(xQueueReceive(SDcardQueueHandle, & appSDcardData.temperature, APP_QUEUE_DELAY) == pdTRUE) { /* If it succeed to read go to SD card log procedure */ appSDcardData.state = APP_SDCARD_STATE_MOUNT; } else { /* If it fail to read go to error */ appSDcardData.state = APP_SDCARD_STATE_ERROR; } }