}
void
-stm_usb_fs_wkup(void)
+stm_usb_fs_wkup_isr(void)
{
/* USB wakeup, just clear the bit for now */
stm_usb.istr &= ~(1 << STM_USB_ISTR_WKUP);
_ao_usb_set_stat_rx(AO_USB_OUT_EPR, STM_USB_EPR_STAT_RX_VALID);
}
-int
+static int
_ao_usb_pollchar(void)
{
uint8_t c;
return c;
}
+#ifndef HAS_USB_DISABLE
+#define HAS_USB_DISABLE 1
+#endif
+
+#if HAS_USB_DISABLE
void
ao_usb_disable(void)
{
stm_rcc.apb1enr &= ~(1 << STM_RCC_APB1ENR_USBEN);
ao_arch_release_interrupts();
}
+#endif
void
ao_usb_enable(void)
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 }
};