aboutsummaryrefslogtreecommitdiff
path: root/lib/usb/usb_f103.c
diff options
context:
space:
mode:
authorUwe Hermann2011-11-16 22:19:10 +0100
committerUwe Hermann2011-11-17 00:12:43 +0100
commit3e9b9cb345858da18d2925bbc3e6dcb5c30810c2 (patch)
tree0b2d88a326bab37bb459c033e6e7240b18d094d2 /lib/usb/usb_f103.c
parentd97c937b8e7c33cf2b30f3606707bf785c4ee2ea (diff)
usb: Coding-style fixes.
Diffstat (limited to 'lib/usb/usb_f103.c')
-rw-r--r--lib/usb/usb_f103.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/usb/usb_f103.c b/lib/usb/usb_f103.c
index 2c5628d..ae55bf0 100644
--- a/lib/usb/usb_f103.c
+++ b/lib/usb/usb_f103.c
@@ -27,7 +27,7 @@
static void stm32f103_usbd_init(void);
static void stm32f103_set_address(u8 addr);
static void stm32f103_ep_setup(u8 addr, u8 type, u16 max_size,
- void (*callback) (u8 ep));
+ void (*callback) (u8 ep));
static void stm32f103_endpoints_reset(void);
static void stm32f103_ep_stall_set(u8 addr, u8 stall);
static u8 stm32f103_ep_stall_get(u8 addr);
@@ -89,8 +89,8 @@ static void usb_set_ep_rx_bufsize(u8 ep, u32 size)
}
}
-static void stm32f103_ep_setup(u8 addr, u8 type, u16 max_size,
- void (*callback) (u8 ep))
+static void stm32f103_ep_setup(u8 addr, u8 type, u16 max_size,
+ void (*callback) (u8 ep))
{
/* Translate USB standard type codes to STM32. */
const u16 typelookup[] = {
@@ -185,13 +185,13 @@ static u8 stm32f103_ep_stall_get(u8 addr)
static void stm32f103_ep_nak_set(u8 addr, u8 nak)
{
- /* It does not make sence to force NAK on IN endpoints */
- if(addr & 0x80)
+ /* It does not make sence to force NAK on IN endpoints. */
+ if (addr & 0x80)
return;
force_nak[addr] = nak;
- if(nak)
+ if (nak)
USB_SET_EP_RX_STAT(addr, USB_EP_RX_STAT_NAK);
else
USB_SET_EP_RX_STAT(addr, USB_EP_RX_STAT_VALID);
@@ -256,7 +256,7 @@ static u16 stm32f103_ep_read_packet(u8 addr, void *buf, u16 len)
usb_copy_from_pm(buf, USB_GET_EP_RX_BUFF(addr), len);
USB_CLR_EP_RX_CTR(addr);
- if(!force_nak[addr])
+ if (!force_nak[addr])
USB_SET_EP_RX_STAT(addr, USB_EP_RX_STAT_VALID);
return len;
@@ -306,4 +306,3 @@ static void stm32f103_poll(void)
USB_CLR_ISTR_SOF();
}
}
-