summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-04-11 23:29:38 -0700
committerKeith Packard <keithp@keithp.com>2012-04-14 13:22:02 -0700
commit93ef7e4a23d13540615f1a9782e1d58ddb7f258e (patch)
tree28029cb50503f7e9520e5f3ce37ff65d68d1d43d
parentd432307a3c2709634350eaa1262b935028d073d3 (diff)
altos: Use new USB driver in megametrum-v0.1 product
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/megametrum-v0.1/Makefile6
-rw-r--r--src/megametrum-v0.1/ao_megametrum.c1
-rw-r--r--src/megametrum-v0.1/ao_pins.h6
3 files changed, 6 insertions, 7 deletions
diff --git a/src/megametrum-v0.1/Makefile b/src/megametrum-v0.1/Makefile
index b0f2a612..3c3d7173 100644
--- a/src/megametrum-v0.1/Makefile
+++ b/src/megametrum-v0.1/Makefile
@@ -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:
diff --git a/src/megametrum-v0.1/ao_megametrum.c b/src/megametrum-v0.1/ao_megametrum.c
index 77a2bf0a..9efde598 100644
--- a/src/megametrum-v0.1/ao_megametrum.c
+++ b/src/megametrum-v0.1/ao_megametrum.c
@@ -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();
diff --git a/src/megametrum-v0.1/ao_pins.h b/src/megametrum-v0.1/ao_pins.h
index 46098d34..e4e5def6 100644
--- a/src/megametrum-v0.1/ao_pins.h
+++ b/src/megametrum-v0.1/ao_pins.h
@@ -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