]> git.gag.com Git - fw/altos/commitdiff
telemega-v5.0: Add Mosaic GPS support
authorKeith Packard <keithp@keithp.com>
Sun, 28 Apr 2024 05:38:40 +0000 (22:38 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 28 Apr 2024 05:39:26 +0000 (22:39 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/telemega-v5.0/Makefile
src/telemega-v5.0/ao_pins.h

index eeadb073442d2c0bfcb90528cc55235043d9a339..6626d7e111794a615c01fe73d380c0e211c1e456 100644 (file)
@@ -64,6 +64,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 5901eeae272fd838b497e5470d34a42f718f4b71..c61dab91f1b97b6e14826007c2d2bfdf06644472 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