]> git.gag.com Git - fw/altos/commitdiff
telemega-v4.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:14 +0000 (22:39 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/telemega-v4.0/Makefile
src/telemega-v4.0/ao_pins.h

index 16db22d6a0d27fa24032cc402f576ba6500d7f1f..23d0554a82dba5601c70b41a0f17db546394ba4f 100644 (file)
@@ -60,6 +60,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 7fa6d83528f5fd3f8fa216a8aadb23d91dbd4a96..031bcef9ca48d59ee5a10b1d2a50fceb887513ad 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           0
 #define USE_SERIAL_2_STDIN     0