kopia lustrzana https://github.com/OpenRTX/OpenRTX
CS7000 Plus: enabled GPS
rodzic
f8dcefb76b
commit
f1486c9a41
|
@ -285,6 +285,8 @@ stm32h743_src = ['platform/mcu/STM32H7xx/boot/startup.cpp',
|
|||
'platform/drivers/GPIO/gpio_stm32.c',
|
||||
'platform/drivers/ADC/adc_stm32h7.c',
|
||||
'platform/drivers/SPI/spi_stm32h7.c',
|
||||
'platform/drivers/GPS/gps_stm32.cpp',
|
||||
'platform/drivers/GPS/nmea_rbuf.c',
|
||||
'platform/drivers/audio/stm32_dac.cpp',
|
||||
'platform/drivers/audio/stm32_adc.cpp',
|
||||
'platform/mcu/CMSIS/Device/ST/STM32H7xx/Source/system_stm32h7xx.c']
|
||||
|
|
|
@ -20,10 +20,12 @@
|
|||
#include <spi_custom.h>
|
||||
#include <spi_stm32.h>
|
||||
#include <adc_stm32.h>
|
||||
#include <gps_stm32.h>
|
||||
#include <hwconfig.h>
|
||||
#include <pthread.h>
|
||||
#include <SKY72310.h>
|
||||
#include <AK2365A.h>
|
||||
#include <gps.h>
|
||||
|
||||
/**
|
||||
* SPI bitbang function for SN74HC595 gpio extender.
|
||||
|
@ -111,3 +113,10 @@ const struct sky73210 pll =
|
|||
.cs = { PLL_CS },
|
||||
.refClk = 16800000
|
||||
};
|
||||
|
||||
const struct gpsDevice gps =
|
||||
{
|
||||
.enable = gpsStm32_enable,
|
||||
.disable = gpsStm32_disable,
|
||||
.getSentence = gpsStm32_getNmeaSentence
|
||||
};
|
||||
|
|
|
@ -50,6 +50,7 @@ extern const struct spiDevice c6000_spi;
|
|||
extern const struct gpioDev extGpio;
|
||||
extern const struct ak2365a detector;
|
||||
extern const struct sky73210 pll;
|
||||
extern const struct gpsDevice gps;
|
||||
|
||||
/* Screen dimensions */
|
||||
#define CONFIG_SCREEN_WIDTH 160
|
||||
|
@ -69,7 +70,9 @@ extern const struct sky73210 pll;
|
|||
#define CONFIG_M17
|
||||
|
||||
/* Device has a GPS chip */
|
||||
// #define CONFIG_GPS
|
||||
#define CONFIG_GPS
|
||||
#define CONFIG_GPS_STM32_USART6
|
||||
#define CONFIG_NMEA_RBUF_SIZE 128
|
||||
|
||||
/* Use extended addressing for external flash memory */
|
||||
#define CONFIG_W25Qx_EXT_ADDR
|
||||
|
|
|
@ -22,9 +22,11 @@
|
|||
#include <gpio_shiftReg.h>
|
||||
#include <spi_bitbang.h>
|
||||
#include <adc_stm32.h>
|
||||
#include <gps_stm32.h>
|
||||
#include <Cx000_dac.h>
|
||||
#include <hwconfig.h>
|
||||
#include <string.h>
|
||||
#include <gps.h>
|
||||
|
||||
static const hwInfo_t hwInfo =
|
||||
{
|
||||
|
@ -65,6 +67,7 @@ void platform_init()
|
|||
void platform_terminate()
|
||||
{
|
||||
adcStm32_terminate(&adc1);
|
||||
gpsStm32_terminate();
|
||||
|
||||
#ifndef RUNNING_TESTSUITE
|
||||
gpioDev_clear(MAIN_PWR_SW);
|
||||
|
@ -206,3 +209,11 @@ const hwInfo_t *platform_getHwInfo()
|
|||
{
|
||||
return &hwInfo;
|
||||
}
|
||||
|
||||
const struct gpsDevice *platform_initGps()
|
||||
{
|
||||
gpio_setMode(GPS_RXD, ALTERNATE | ALTERNATE_FUNC(7));
|
||||
gpsStm32_init(9600);
|
||||
|
||||
return &gps;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue