]> git.gag.com Git - fw/altos/commitdiff
telemega-v7.0: Add Mosaic GPS support
authorKeith Packard <keithp@keithp.com>
Sat, 26 Jul 2025 18:49:41 +0000 (11:49 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 26 Jul 2025 18:49:41 +0000 (11:49 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/telemega-v7.0/Makefile
src/telemega-v7.0/ao_pins.h

index a9e830004d2729d694d3da42d3c71deb7706d1dd..013a28e4d1e4033e534697ac44b7c7d5ad1914db 100644 (file)
@@ -61,6 +61,8 @@ ALTOS_SRC = \
        ao_mutex.c \
        ao_serial_stm.c \
        ao_gps_ublox.c \
+       ao_gps_mosaic.c \
+       ao_crc_ccitt.c \
        ao_gps_show.c \
        ao_gps_report_mega.c \
        ao_ignite.c \
index 984426199ff10a1db9c64abfaf780fe3fcd2987d..62f4c85c8c1f340c775c7a640e22d745ea347f38 100644 (file)
 #define AO_APB2_PRESCALER      2
 #define AO_RCC_CFGR_PPRE2_DIV  STM_RCC_CFGR_PPRE2_DIV_2
 
+#define HAS_GPS_MOSAIC         1
+
+#if HAS_GPS_MOSAIC
+
+/* Companion cs_companion0(pin 6) = TX cs_companion1 (pin 5) = RX */
+
+#define HAS_SERIAL_1           1
+#define USE_SERIAL_1_STDIN     0
+#define SERIAL_1_PB6_PB7       1
+#define SERIAL_1_PA9_PA10      0
+
+#define ao_mosaic_getchar      ao_serial1_getchar
+#define ao_mosaic_putchar      ao_serial1_putchar
+#define ao_mosaic_set_speed    ao_serial1_set_speed
+#define ao_mosaic_fifo         (ao_stm_usart1.rx_fifo)
+
+#else
 #define HAS_SERIAL_1           0
 #define USE_SERIAL_1_STDIN     0
 #define SERIAL_1_PB6_PB7       0
 #define SERIAL_1_PA9_PA10      0
+#endif
 
 #define HAS_SERIAL_2           1
 #define USE_SERIAL_2_STDIN     0