Use select for EP0 handling + split ep0 into init and loop

This commit is contained in:
Ed Clarke
2018-10-28 08:29:39 +00:00
parent 78f9e890d6
commit 35b43c0762
4 changed files with 581 additions and 507 deletions

View File

@@ -301,7 +301,7 @@ void XUA_Buffer_lite(chanend c_aud_out, chanend c_feedback, chanend c_aud_in, ch
// for (int i = 0; i < NUM_USB_CHAN_OUT; i++) c_audio_hub <: samples_out[1];
int out_samps[NUM_USB_CHAN_OUT];
fifo_ret_t ret = fifo_block_pop(host_to_device_fifo_ptr, out_samps, NUM_USB_CHAN_OUT);
if (ret != FIFO_SUCCESS) debug_printf("empty\n");
//if (ret != FIFO_SUCCESS) debug_printf("empty\n");
for (int i = 0; i < NUM_USB_CHAN_OUT; i++) c_audio_hub <: out_samps[i];
break;
}