usb: Coding-style fixes.

This commit is contained in:
Uwe Hermann
2011-11-16 22:19:10 +01:00
parent d97c937b8e
commit 3e9b9cb345
5 changed files with 129 additions and 120 deletions

View File

@@ -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();
}
}