/* Calculate the endpoint 0 COUNT_RX register value from  */
static uint16_t ep0_count_rx(uint16_t ep0_size)
/* Calculate the endpoint 0 COUNT_RX register value from  */
static uint16_t ep0_count_rx(uint16_t ep0_size)
{
	if (ep0_size >= 64) {
		return USB_EP_COUNT_RX_BL_SIZE | USB_EP_COUNT_RX_NUM_BLOCK(1);
	} else if (ep0_size >= 32) {
		return USB_EP_COUNT_RX_NUM_BLOCK(16);
	} else if (ep0_size >= 16) {
		return USB_EP_COUNT_RX_NUM_BLOCK(8);
	} else {
		return USB_EP_COUNT_RX_NUM_BLOCK(4);
	}
}