Skip to content

Commit

Permalink
stm32: usb: Rename USB_DADDR_ENABLE flag per ref manual
Browse files Browse the repository at this point in the history
Use the standard REG_BIT name from the reference manuals, as specified
in HACKING  All the other bits have the correct naming.
  • Loading branch information
kuldeepdhaka authored and karlp committed Jul 29, 2015
1 parent 4b89272 commit afefa68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/libopencm3/stm32/usb.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/usb/usb_f103.c
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit afefa68

Please sign in to comment.