projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/stm32f4: Place ARM.exidx sections after .text
[fw/altos]
/
src
/
lpc
/
ao_usb_lpc.c
diff --git
a/src/lpc/ao_usb_lpc.c
b/src/lpc/ao_usb_lpc.c
index 3b3226adac357161453ed3aabce5579a664a8bd5..594114b62ed856a8b4babc8f9ccf47f3597d9624 100644
(file)
--- a/
src/lpc/ao_usb_lpc.c
+++ b/
src/lpc/ao_usb_lpc.c
@@
-3,7
+3,8
@@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-476,7
+477,7
@@
ao_usb_ep0_in_start(uint16_t max)
ao_usb_ep0_flush();
}
ao_usb_ep0_flush();
}
-st
atic st
ruct ao_usb_line_coding ao_usb_line_coding = {115200, 0, 0, 8};
+struct ao_usb_line_coding ao_usb_line_coding = {115200, 0, 0, 8};
/* Walk through the list of descriptors and find a match
*/
/* Walk through the list of descriptors and find a match
*/
@@
-856,7
+857,7
@@
ao_usb_disable(void)
ao_arch_block_interrupts();
#if HAS_USB_PULLUP
ao_arch_block_interrupts();
#if HAS_USB_PULLUP
- ao_gpio_set(AO_USB_PULLUP_PORT, AO_USB_PULLUP_PIN,
AO_USB_PULLUP,
0);
+ ao_gpio_set(AO_USB_PULLUP_PORT, AO_USB_PULLUP_PIN, 0);
#endif
/* Disable interrupts */
lpc_usb.inten = 0;
#endif
/* Disable interrupts */
lpc_usb.inten = 0;
@@
-974,7
+975,7
@@
ao_usb_enable(void)
ao_usb_set_ep0();
#if HAS_USB_PULLUP
ao_usb_set_ep0();
#if HAS_USB_PULLUP
- ao_gpio_set(AO_USB_PULLUP_PORT, AO_USB_PULLUP_PIN,
AO_USB_PULLUP,
1);
+ ao_gpio_set(AO_USB_PULLUP_PORT, AO_USB_PULLUP_PIN, 1);
#endif
}
#endif
}
@@
-1002,7
+1003,7
@@
ao_usb_irq(void)
control_count, out_count, in_count, int_count, reset_count);
}
control_count, out_count, in_count, int_count, reset_count);
}
-
__code
struct ao_cmds ao_usb_cmds[] = {
+
const
struct ao_cmds ao_usb_cmds[] = {
{ ao_usb_irq, "I\0Show USB interrupt counts" },
{ 0, NULL }
};
{ ao_usb_irq, "I\0Show USB interrupt counts" },
{ 0, NULL }
};
@@
-1012,7
+1013,11
@@
void
ao_usb_init(void)
{
#if HAS_USB_PULLUP
ao_usb_init(void)
{
#if HAS_USB_PULLUP
- ao_enable_output(AO_USB_PULLUP_PORT, AO_USB_PULLUP_PIN, AO_USB_PULLUP, 0);
+ int i;
+ ao_enable_output(AO_USB_PULLUP_PORT, AO_USB_PULLUP_PIN, 0);
+
+ for (i = 0; i < 40000; i++)
+ ao_arch_nop();
#endif
ao_usb_enable();
#endif
ao_usb_enable();