summaryrefslogtreecommitdiff
path: root/chip/stm32/usb_hw.h
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/usb_hw.h')
-rw-r--r--chip/stm32/usb_hw.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/chip/stm32/usb_hw.h b/chip/stm32/usb_hw.h
index be2a88661e..0c75322a7d 100644
--- a/chip/stm32/usb_hw.h
+++ b/chip/stm32/usb_hw.h
@@ -34,6 +34,9 @@ extern usb_uint __usb_ram_start[];
/* Attribute to define a buffer variable in USB RAM */
#define __usb_ram __attribute__((section(".usb_ram.99_data")))
+/* Mask for the rx_count to identify the number of bytes in the buffer. */
+#define RX_COUNT_MASK (0x3ff)
+
struct stm32_endpoint {
volatile usb_uint tx_addr;
volatile usb_uint tx_count;