X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fstm%2Fao_usb_stm.c;h=d7cbd5b7616902ba6fb2ad504c010d14b3ef1bdf;hp=e436d264088221aa2f84f0b05cb316f238dde2e0;hb=c6e57291d91f1f6c4de5c54a5cfd3eef66d9f830;hpb=a414a32f86c9d8a2c5f576898c0f0dc75263ff85 diff --git a/src/stm/ao_usb_stm.c b/src/stm/ao_usb_stm.c index e436d264..d7cbd5b7 100644 --- a/src/stm/ao_usb_stm.c +++ b/src/stm/ao_usb_stm.c @@ -970,6 +970,11 @@ ao_usb_getchar(void) return c; } +#ifndef HAS_USB_DISABLE +#define HAS_USB_DISABLE 1 +#endif + +#if HAS_USB_DISABLE void ao_usb_disable(void) { @@ -987,6 +992,7 @@ ao_usb_disable(void) stm_rcc.apb1enr &= ~(1 << STM_RCC_APB1ENR_USBEN); ao_arch_release_interrupts(); } +#endif void ao_usb_enable(void) @@ -1073,7 +1079,7 @@ ao_usb_irq(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 } };