void USB_Connect() { USB_Enable(0, 1); wait_release(); wait_press(); wait_release(); USB_Disable(); }
static void initialize() { CLOCK_StopTimer(); num_channels = Model.num_channels; PrevXferComplete = 1; USB_Enable(1, 1); CLOCK_StartTimer(1000, usbhid_cb); }
unsigned usb_cb(u32 button, unsigned flags, void *data) { (void)button; (void)data; if(flags == BUTTON_RELEASE) { _draw_page(1); GUI_RefreshScreen(); USB_Enable(0, 1); wait_release(); wait_press(); wait_release(); USB_Disable(); _draw_page(0); } return 1; }