usb_cdc: Allow USB endpoint ids to be board specific
It's common for boards to have restrictions on the type of each endpoint. So, make it possible for the board to select the endpoint ids for each endpoint. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
10
src/lpc176x/usb_cdc_ep.h
Normal file
10
src/lpc176x/usb_cdc_ep.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef __LPC176X_USB_CDC_EP_H
|
||||
#define __LPC176X_USB_CDC_EP_H
|
||||
|
||||
enum {
|
||||
USB_CDC_EP_ACM = 1,
|
||||
USB_CDC_EP_BULK_OUT = 2,
|
||||
USB_CDC_EP_BULK_IN = 5,
|
||||
};
|
||||
|
||||
#endif // usb_cdc_ep.h
|
||||
@@ -6,11 +6,12 @@
|
||||
|
||||
#include <string.h> // memcpy
|
||||
#include "LPC17xx.h" // LPC_SC
|
||||
#include "board/usb_cdc.h" // usb_notify_setup
|
||||
#include "byteorder.h" // cpu_to_le32
|
||||
#include "command.h" // output
|
||||
#include "generic/usb_cdc.h" // usb_notify_setup
|
||||
#include "internal.h" // gpio_peripheral
|
||||
#include "sched.h" // DECL_INIT
|
||||
#include "usb_cdc_ep.h" // USB_CDC_EP_BULK_IN
|
||||
|
||||
// Internal endpoint addresses
|
||||
#define EP0OUT 0x00
|
||||
|
||||
Reference in New Issue
Block a user