projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into branch-1.5
[fw/altos]
/
src
/
stm
/
ao_usb_stm.c
diff --git
a/src/stm/ao_usb_stm.c
b/src/stm/ao_usb_stm.c
index b00390ec0318b14901a68156ad29597df5b08f2f..4e9d1f145cd98001e4378d3f8ea12050fc034e91 100644
(file)
--- a/
src/stm/ao_usb_stm.c
+++ b/
src/stm/ao_usb_stm.c
@@
-117,9
+117,8
@@
static uint8_t ao_usb_in_pending;
* but not pulled to the shadow buffer.
*/
static uint8_t ao_usb_out_avail;
* but not pulled to the shadow buffer.
*/
static uint8_t ao_usb_out_avail;
-
static uint8_t
ao_usb_running;
+
uint8_t
ao_usb_running;
static uint8_t ao_usb_configuration;
static uint8_t ao_usb_configuration;
-static uint8_t ueienx_0;
#define AO_USB_EP0_GOT_RESET 1
#define AO_USB_EP0_GOT_SETUP 2
#define AO_USB_EP0_GOT_RESET 1
#define AO_USB_EP0_GOT_SETUP 2
@@
-313,7
+312,6
@@
ao_usb_init_ep(uint8_t ep, uint32_t addr, uint32_t type, uint32_t stat_rx, uint3
static void
ao_usb_set_ep0(void)
{
static void
ao_usb_set_ep0(void)
{
- uint32_t epr;
int e;
ao_usb_sram_addr = 0;
int e;
ao_usb_sram_addr = 0;
@@
-356,8
+354,6
@@
ao_usb_set_ep0(void)
static void
ao_usb_set_configuration(void)
{
static void
ao_usb_set_configuration(void)
{
- uint32_t epr;
-
debug ("ao_usb_set_configuration\n");
/* Set up the INT end point */
debug ("ao_usb_set_configuration\n");
/* Set up the INT end point */
@@
-731,6
+727,9
@@
ao_usb_ep0_handle(uint8_t receive)
if (receive & AO_USB_EP0_GOT_TX_ACK) {
debug ("\tgot tx ack\n");
if (receive & AO_USB_EP0_GOT_TX_ACK) {
debug ("\tgot tx ack\n");
+#if HAS_FLIGHT && AO_USB_FORCE_IDLE
+ ao_flight_force_idle = 1;
+#endif
/* Wait until the IN packet is received from addr 0
* before assigning our local address
*/
/* Wait until the IN packet is received from addr 0
* before assigning our local address
*/
@@
-965,7
+964,7
@@
ao_usb_disable(void)
stm_usb.cntr = (1 << STM_USB_CNTR_PDWN) | (1 << STM_USB_CNTR_FRES);
/* Disable the interface */
stm_usb.cntr = (1 << STM_USB_CNTR_PDWN) | (1 << STM_USB_CNTR_FRES);
/* Disable the interface */
- stm_rcc.apb1enr &
+
~(1 << STM_RCC_APB1ENR_USBEN);
+ stm_rcc.apb1enr &
=
~(1 << STM_RCC_APB1ENR_USBEN);
ao_arch_release_interrupts();
}
ao_arch_release_interrupts();
}