summaryrefslogtreecommitdiff
path: root/src/megametrum-v0.1
diff options
context:
space:
mode:
Diffstat (limited to 'src/megametrum-v0.1')
-rw-r--r--src/megametrum-v0.1/Makefile2
-rw-r--r--src/megametrum-v0.1/ao_megametrum.c18
-rw-r--r--src/megametrum-v0.1/ao_pins.h9
3 files changed, 10 insertions, 19 deletions
diff --git a/src/megametrum-v0.1/Makefile b/src/megametrum-v0.1/Makefile
index a07b25ee..5761fed7 100644
--- a/src/megametrum-v0.1/Makefile
+++ b/src/megametrum-v0.1/Makefile
@@ -24,7 +24,6 @@ INC = \
# Common AltOS sources
#
-# ao_cc1120.c \
# ao_packet.c \
# ao_packet_slave.c \
@@ -45,6 +44,7 @@ ALTOS_SRC = \
ao_freq.c \
ao_dma_stm.c \
ao_spi_stm.c \
+ ao_cc1120.c \
ao_ms5607.c \
ao_adc_stm.c \
ao_beep_stm.c \
diff --git a/src/megametrum-v0.1/ao_megametrum.c b/src/megametrum-v0.1/ao_megametrum.c
index 19746d37..628c5538 100644
--- a/src/megametrum-v0.1/ao_megametrum.c
+++ b/src/megametrum-v0.1/ao_megametrum.c
@@ -21,21 +21,6 @@
#include <ao_log.h>
#include <ao_exti.h>
-void
-beep(void)
-{
- ao_beep(AO_BEEP_MID);
- printf ("Hit a character to stop..."); flush();
- getchar();
- putchar('\n');
- ao_beep(0);
-}
-
-const struct ao_cmds ao_mm_cmds[] = {
- { beep, "b\0Beep" },
- { 0, NULL },
-};
-
int
main(void)
{
@@ -55,7 +40,7 @@ main(void)
ao_storage_init();
ao_usb_init();
ao_exti_init();
-// ao_radio_init();
+ ao_radio_init();
ao_i2c_init();
ao_hmc5883_init();
ao_mpu6000_init();
@@ -64,7 +49,6 @@ main(void)
ao_report_init();
ao_config_init();
- ao_cmd_register(&ao_mm_cmds[0]);
ao_start_scheduler();
return 0;
}
diff --git a/src/megametrum-v0.1/ao_pins.h b/src/megametrum-v0.1/ao_pins.h
index d6394d9b..5121ad58 100644
--- a/src/megametrum-v0.1/ao_pins.h
+++ b/src/megametrum-v0.1/ao_pins.h
@@ -65,6 +65,7 @@
#define USE_INTERNAL_FLASH 0
#define HAS_USB 1
#define HAS_BEEP 1
+#define HAS_RADIO 1
#define HAS_SPI_1 1
#define SPI_1_PA5_PA6_PA7 1
@@ -74,6 +75,10 @@
#define HAS_SPI_2 1
#define SPI_2_PB13_PB14_PB15 1
#define SPI_2_PD1_PD3_PD4 0
+#define SPI_2_GPIO stm_gpiob
+#define SPI_2_SCK 13
+#define SPI_2_MISO 14
+#define SPI_2_MOSI 15
#define HAS_I2C_1 1
#define I2C_1_PB8_PB9 1
@@ -81,7 +86,7 @@
#define HAS_I2C_2 1
#define I2C_2_PB10_PB11 1
-#define PACKET_HAS_SLAVE 1
+#define PACKET_HAS_SLAVE 0
#define LOW_LEVEL_DEBUG 1
@@ -251,4 +256,6 @@ struct ao_adc {
#define HAS_HIGHG_ACCEL 1
+#define NUM_CMDS 16
+
#endif /* _AO_PINS_H_ */