Convert the usb callback function to using cgsem_t timed waits to avoid race conditions with conditionals/mutexes.