diff options
author | Keith Packard <keithp@keithp.com> | 2014-07-15 22:52:35 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-07-15 22:55:34 -0700 |
commit | b1c45d010276b762ef657a759198156106c29962 (patch) | |
tree | 1e22d5ecaea76ae1801c53b251c7184d6efaa410 /src | |
parent | 3cf030fffffd223c3717011e03aac82346295d71 (diff) |
altos/flash-loader: On STM, don't include ao_usb_disablefox1-v3-sn8fox1-v3-sn7fox1-v3-sn6fox1-v3-sn5
This saves a bit of space, keeping the flash loader under 4k on fox
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/product/ao_flash_pins.h | 1 | ||||
-rw-r--r-- | src/stm/ao_usb_stm.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/product/ao_flash_pins.h b/src/product/ao_flash_pins.h index 4917ee6f..9acf4d21 100644 --- a/src/product/ao_flash_pins.h +++ b/src/product/ao_flash_pins.h @@ -24,6 +24,7 @@ #define HAS_USB 1 #define USE_USB_STDIO 0 +#define HAS_USB_DISABLE 0 #define HAS_BEEP 0 #define HAS_TASK 0 #define HAS_ECHO 0 diff --git a/src/stm/ao_usb_stm.c b/src/stm/ao_usb_stm.c index 4e9d1f14..d4dac887 100644 --- a/src/stm/ao_usb_stm.c +++ b/src/stm/ao_usb_stm.c @@ -950,6 +950,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) { @@ -967,6 +972,7 @@ ao_usb_disable(void) stm_rcc.apb1enr &= ~(1 << STM_RCC_APB1ENR_USBEN); ao_arch_release_interrupts(); } +#endif void ao_usb_enable(void) |