From 0d1f5fc0364a9186e9590abca2a7f285a4d60f0a Mon Sep 17 00:00:00 2001 From: Kuldeep Singh Dhaka Date: Sat, 1 Aug 2015 18:23:23 +0530 Subject: [PATCH] usb: Added USB_FNR register defines credit: @fenugrec --- include/libopencm3/stm32/usb.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/libopencm3/stm32/usb.h b/include/libopencm3/stm32/usb.h index 7be2dcc4..3e09b7e1 100644 --- a/include/libopencm3/stm32/usb.h +++ b/include/libopencm3/stm32/usb.h @@ -108,6 +108,17 @@ LGPL License Terms @ref lgpl_license #define USB_CLR_ISTR_SOF() CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_SOF) #define USB_CLR_ISTR_ESOF() CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_ESOF) +/* USB Frame Number Register bits ------------------------------------------ */ + +#define USB_FNR_RXDP (1 << 15) +#define USB_FNR_RXDM (1 << 14) +#define USB_FNR_LCK (1 << 13) + +#define USB_FNR_LSOF_SHIFT 11 +#define USB_FNR_LSOF (3 << USB_FNR_LSOF_SHIFT) + +#define USB_FNR_FN (0x7FF << 0) + /* --- USB device address register masks / bits ---------------------------- */ #define USB_DADDR_EF 0x0080