void cdc_ep_init() { // setup the endpoints ep_config(EP_1, BULK, DIR_IN, MAX_PACKET_SZ); ep_config(EP_2, INTP, DIR_IN, MAX_PACKET_SZ); ep_config(EP_3, BULK, DIR_OUT, MAX_PACKET_SZ); }
void ep_init() { U8 i; // Initialize USB clock to use 48Mhz Oscillator //SI32_USB_A_verify_clock_is_running(SI32_USB_0); // disable and clear all endpoints for (i=0; i<MAX_EPS; i++) { ep_disable(i); ep_cfg_clear(i); } // reset all the endpoints //UERST = 0x7F; //UERST = 0; // configure the control endpoint first since that one is needed for enumeration ep_config( EP_CTRL, XFER_CONTROL, DIR_OUT, MAX_PACKET_SZ ); NVIC_EnableIRQ( USB0_IRQn ); // set the rx setup interrupt to received the enumeration interrupts //ep_select(EP_CTRL); }
void ep_init() { U8 i; // disable and clear all endpoints for (i=0; i<MAX_EPS; i++) { ep_select(i); ep_disable(i); ep_cfg_clear(i); } // reset all the endpoints UERST = 0x7F; UERST = 0; // configure the control endpoint first since that one is needed for enumeration ep_config(EP_CTRL, CONTROL, DIR_OUT, MAX_PACKET_SZ); // set the rx setup interrupt to received the enumeration interrupts ep_select(EP_CTRL); }
/* * Initialize the endpoints according to the CDC class driver. The class * driver specifies a BULK IN, BULK OUT, and INTERRUPT IN endpoint. We will * usually set this after the host issues the set_configuration request. */ void cdc_ep_init() { ep_config(EP_1, BULK, DIR_IN, PKTSZ_64); ep_config(EP_2, INTP, DIR_IN, PKTSZ_64); ep_config(EP_3, BULK, DIR_OUT, PKTSZ_64); }