altos: Use new USB driver in megametrum-v0.1 product
authorKeith Packard <keithp@keithp.com>
Thu, 12 Apr 2012 06:29:38 +0000 (23:29 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 14 Apr 2012 20:22:02 +0000 (13:22 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/megametrum-v0.1/Makefile
src/megametrum-v0.1/ao_megametrum.c
src/megametrum-v0.1/ao_pins.h

index b0f2a61211fb37c2000bbf43ba0e2f9ceda15157..3c3d7173f27959768e63a15b8a49ece0b5ecc868 100644 (file)
@@ -40,7 +40,8 @@ ALTOS_SRC = \
        ao_adc_stm.c \
        ao_beep_stm.c \
        ao_storage.c \
-       ao_m25.c
+       ao_m25.c \
+       ao_usb_stm.c
 
 PRODUCT=MegaMetrum-v0.1
 PRODUCT_DEF=-DMEGAMETRUM
@@ -66,9 +67,6 @@ $(OBJ): $(INC)
 ao_product.h: ao-make-product.5c ../Version
        $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
 
-ao_product.rel: ao_product.c ao_product.h
-       $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
-
 distclean:     clean
 
 clean:
index 77a2bf0a111f72901c1347f9ddb9502dde14a6f3..9efde5986e931807a0e68ff066f58bb27a48657e 100644 (file)
@@ -50,6 +50,7 @@ main(void)
        ao_beep_init();
        ao_adc_init();
        ao_storage_init();
+       ao_usb_init();
        
        ao_cmd_register(&ao_mm_cmds[0]);
        ao_start_scheduler();
index 46098d34689d060af88bdb24b6b762ab2d676835..e4e5def64ef8c59e05463f77423a1dfd3dcdb392 100644 (file)
@@ -21,7 +21,7 @@
 /* 8MHz High speed external crystal */
 #define AO_HSE                 8000000
 
-/* PLLVCO = 96MHz (so that USB will work*/
+/* PLLVCO = 96MHz (so that USB will work*/
 #define AO_PLLMUL              12
 #define AO_RCC_CFGR_PLLMUL     (STM_RCC_CFGR_PLLMUL_12)
 
@@ -61,8 +61,8 @@
 #define ao_gps_putchar         ao_serial3_putchar
 #define ao_gps_set_speed       ao_serial3_set_speed
 
-#define HAS_USB                        0
-#define HAS_BEEP               0
+#define HAS_USB                        1
+#define HAS_BEEP               1
 
 #define HAS_SPI_1              1
 #define SPI_1_PA5_PA6_PA7      1