void US_Init(void) { usDevice.state = ECHO_IDLE; usDevice.capture = 0; usDevice.trigDevice = TRIG_Init(NULL); usDevice.echoDevice = TU_US_Init(&usDevice); mutexHandle = FRTOS1_xSemaphoreCreateMutex(); if (mutexHandle==NULL) { for(;;); } }
void US_Init(void) { usDevice.state = ECHO_IDLE; usDevice.capture = 0; usDevice.trigDevice = TRIG_Init(NULL); usDevice.echoDevice = TU_US_Init(&usDevice); }