aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2025-02-05 19:00:28 -0500
committerKevin O'Connor <kevin@koconnor.net>2025-02-15 18:22:45 -0500
commitec56167032253b19bed362b25d3696f5d810633b (patch)
treecba13f3f44c0d221965833611cb17f161ae02037
parent15339aec6468e9241262cc84d556eee6f77ec496 (diff)
downloadkutter-ec56167032253b19bed362b25d3696f5d810633b.tar.gz
kutter-ec56167032253b19bed362b25d3696f5d810633b.tar.xz
kutter-ec56167032253b19bed362b25d3696f5d810633b.zip
usb_cdc_ep: Define endpoint sizes in usb_cdc_ep.h
Move the definition of the usb endpoint sizes from usb_cdc.h to usb_cdc_ep.h . This allows individual boards to override the default endpoint sizes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--src/generic/usb_cdc.h8
-rw-r--r--src/generic/usb_cdc_ep.h8
-rw-r--r--src/lpc176x/usb_cdc_ep.h7
3 files changed, 15 insertions, 8 deletions
diff --git a/src/generic/usb_cdc.h b/src/generic/usb_cdc.h
index 3c92ef13..2149c278 100644
--- a/src/generic/usb_cdc.h
+++ b/src/generic/usb_cdc.h
@@ -3,14 +3,6 @@
#include <stdint.h> // uint_fast8_t
-// endpoint sizes
-enum {
- USB_CDC_EP0_SIZE = 16,
- USB_CDC_EP_ACM_SIZE = 8,
- USB_CDC_EP_BULK_OUT_SIZE = 64,
- USB_CDC_EP_BULK_IN_SIZE = 64,
-};
-
// callbacks provided by board specific code
int_fast8_t usb_read_bulk_out(void *data, uint_fast8_t max_len);
int_fast8_t usb_send_bulk_in(void *data, uint_fast8_t len);
diff --git a/src/generic/usb_cdc_ep.h b/src/generic/usb_cdc_ep.h
index f7521580..3b0e6beb 100644
--- a/src/generic/usb_cdc_ep.h
+++ b/src/generic/usb_cdc_ep.h
@@ -8,4 +8,12 @@ enum {
USB_CDC_EP_ACM = 3,
};
+// Default endpoint sizes
+enum {
+ USB_CDC_EP0_SIZE = 16,
+ USB_CDC_EP_ACM_SIZE = 8,
+ USB_CDC_EP_BULK_OUT_SIZE = 64,
+ USB_CDC_EP_BULK_IN_SIZE = 64,
+};
+
#endif // usb_cdc_ep.h
diff --git a/src/lpc176x/usb_cdc_ep.h b/src/lpc176x/usb_cdc_ep.h
index d657f3c2..ef9649ed 100644
--- a/src/lpc176x/usb_cdc_ep.h
+++ b/src/lpc176x/usb_cdc_ep.h
@@ -7,4 +7,11 @@ enum {
USB_CDC_EP_BULK_IN = 5,
};
+enum {
+ USB_CDC_EP0_SIZE = 16,
+ USB_CDC_EP_ACM_SIZE = 8,
+ USB_CDC_EP_BULK_OUT_SIZE = 64,
+ USB_CDC_EP_BULK_IN_SIZE = 64,
+};
+
#endif // usb_cdc_ep.h