From afefa6888c4fbcfff847329e2b315063e58fbeff Mon Sep 17 00:00:00 2001 From: Kuldeep Singh Dhaka Date: Sun, 26 Jul 2015 12:17:15 +0530 Subject: [PATCH] stm32: usb: Rename USB_DADDR_ENABLE flag per ref manual Use the standard REG_BIT name from the reference manuals, as specified in HACKING All the other bits have the correct naming. --- include/libopencm3/stm32/usb.h | 2 +- lib/usb/usb_f103.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/libopencm3/stm32/usb.h b/include/libopencm3/stm32/usb.h index 118ef694ff..129f1ba8eb 100644 --- a/include/libopencm3/stm32/usb.h +++ b/include/libopencm3/stm32/usb.h @@ -113,7 +113,7 @@ LGPL License Terms @ref lgpl_license /* --- USB device address register masks / bits ---------------------------- */ -#define USB_DADDR_ENABLE 0x0080 +#define USB_DADDR_EF 0x0080 #define USB_DADDR_ADDR 0x007F #define USB_LPMCSR_BESL_SHIFT 4 diff --git a/lib/usb/usb_f103.c b/lib/usb/usb_f103.c index 201cb13264..de3032ebad 100644 --- a/lib/usb/usb_f103.c +++ b/lib/usb/usb_f103.c @@ -76,7 +76,7 @@ static void stm32f103_set_address(usbd_device *dev, uint8_t addr) { (void)dev; /* Set device address and enable. */ - SET_REG(USB_DADDR_REG, (addr & USB_DADDR_ADDR) | USB_DADDR_ENABLE); + SET_REG(USB_DADDR_REG, (addr & USB_DADDR_ADDR) | USB_DADDR_EF); } /**