From 649343eb47245b5edbc2ad58e8845ea750f15778 Mon Sep 17 00:00:00 2001 From: Phil Tokumaru Date: Thu, 21 Nov 2024 11:49:47 -0800 Subject: [PATCH] change local #includes to use quotes --- common/Callbacks.h | 2 +- common/CommonConfig.h | 2 +- common/USB_AL94/usbd_cdc.h | 2 +- common/USB_AL94/usbd_cdc_if.c | 2 +- common/USB_AL94/usbd_composite.h | 2 +- common/USB_AL94/usbd_conf.c | 2 +- common/Varmint.cpp | 4 +- common/Varmint.h | 35 +++++++++--------- common/drivers/Adc.cpp | 10 ++--- common/drivers/Adc.h | 4 +- common/drivers/Adis165xx.cpp | 8 ++-- common/drivers/Adis165xx.h | 6 +-- common/drivers/Auav.cpp | 10 ++--- common/drivers/Auav.h | 6 +-- common/drivers/Bmi088.cpp | 12 +++--- common/drivers/Bmi088.h | 4 +- common/drivers/ByteFifo.h | 2 +- common/drivers/DlhrL20G.cpp | 8 ++-- common/drivers/DlhrL20G.h | 8 ++-- common/drivers/Dps310.cpp | 8 ++-- common/drivers/Dps310.h | 8 ++-- common/drivers/Driver.h | 10 ++--- common/drivers/Iis2mdc.cpp | 9 +++-- common/drivers/Iis2mdc.h | 6 +-- common/drivers/Ist8308.cpp | 6 +-- common/drivers/Ist8308.h | 8 ++-- common/drivers/Mcp4017.h | 4 +- common/drivers/Mpu.cpp | 4 +- common/drivers/Ms4525.cpp | 7 ++-- common/drivers/Ms4525.h | 8 ++-- common/drivers/PacketFifo.h | 2 +- common/drivers/Packets.h | 2 +- common/drivers/Polling.cpp | 6 +-- common/drivers/Pwm.cpp | 6 +-- common/drivers/Pwm.h | 5 +-- common/drivers/Sbus.cpp | 8 ++-- common/drivers/Sbus.h | 4 +- common/drivers/Sd.cpp | 16 +++++--- common/drivers/Sd.h | 2 +- common/drivers/Spi.h | 7 ++-- common/drivers/Telem.cpp | 11 +++--- common/drivers/Telem.h | 10 ++--- common/drivers/Time64.h | 6 +-- common/drivers/Ubx.cpp | 8 ++-- common/drivers/Ubx.h | 4 +- common/drivers/Vcp.cpp | 12 +++--- common/drivers/Vcp.h | 6 +-- common/drivers/misc.cpp | 8 ++-- pixracer_pro/.cproject | 32 ++-------------- pixracer_pro/.settings/language.settings.xml | 4 +- pixracer_pro/Core/Src/main.c | 2 +- pixracer_pro/Core/Src/stm32h7xx_it.c | 4 +- pixracer_pro/specific/BoardConfig.h | 2 +- pixracer_pro/specific/Callbacks.cpp | 12 +++--- pixracer_pro/specific/Varmint_Init.cpp | 26 ++++++------- pixracer_pro/specific/sandbox.cpp | 8 ++-- varmint_10X/.cproject | 3 -- varmint_10X/.settings/language.settings.xml | 4 +- varmint_10X/Core/Src/main.c | 2 +- varmint_10X/Core/Src/stm32h7xx_it.c | 4 +- varmint_10X/specific/BoardConfig.h | 2 +- varmint_10X/specific/Callbacks.cpp | 13 +++---- varmint_10X/specific/Varmint_Init.cpp | 39 ++++++++++---------- varmint_10X/specific/sandbox.cpp | 8 ++-- 64 files changed, 232 insertions(+), 263 deletions(-) diff --git a/common/Callbacks.h b/common/Callbacks.h index 2f6fe38..6b04cf0 100644 --- a/common/Callbacks.h +++ b/common/Callbacks.h @@ -38,7 +38,7 @@ #ifndef USERCALLBACKS_H_ #define USERCALLBACKS_H_ -#include +#include "main.h" #ifdef __cplusplus extern "C" { diff --git a/common/CommonConfig.h b/common/CommonConfig.h index 1c8e26e..e585b11 100644 --- a/common/CommonConfig.h +++ b/common/CommonConfig.h @@ -37,7 +37,7 @@ #include "stm32h7xx_hal.h" -#include +#include "main.h" // Buffers types diff --git a/common/USB_AL94/usbd_cdc.h b/common/USB_AL94/usbd_cdc.h index 7ecfee1..6bcdb3a 100644 --- a/common/USB_AL94/usbd_cdc.h +++ b/common/USB_AL94/usbd_cdc.h @@ -25,7 +25,7 @@ extern "C" { #endif #include "usbd_ioreq.h" -#include +#include "BoardConfig.h" #define CDC_ACM_STR_DESC "STM32 CDC ACM%d" diff --git a/common/USB_AL94/usbd_cdc_if.c b/common/USB_AL94/usbd_cdc_if.c index f5ee6d4..93bccae 100644 --- a/common/USB_AL94/usbd_cdc_if.c +++ b/common/USB_AL94/usbd_cdc_if.c @@ -21,7 +21,7 @@ /* Includes ------------------------------------------------------------------*/ #include "usbd_cdc_if.h" -#include +#include "Callbacks.h" #define APP_RX_DATA_SIZE 128 //#define APP_TX_DATA_SIZE 128 diff --git a/common/USB_AL94/usbd_composite.h b/common/USB_AL94/usbd_composite.h index ba26ad4..ebfa5e8 100644 --- a/common/USB_AL94/usbd_composite.h +++ b/common/USB_AL94/usbd_composite.h @@ -26,7 +26,7 @@ extern "C" { #include "stdbool.h" #include "usbd_ioreq.h" -#include // NOTE! replaced "AL94.I-CUBE-USBD-COMPOSITE_conf.h" +#include "BoardConfig.h" // NOTE! replaced "AL94.I-CUBE-USBD-COMPOSITE_conf.h" #define USBD_USE_HS _USBD_USE_HS #define USBD_USE_CDC_ACM _USBD_USE_CDC_ACM diff --git a/common/USB_AL94/usbd_conf.c b/common/USB_AL94/usbd_conf.c index 5ffa2f4..46e8295 100644 --- a/common/USB_AL94/usbd_conf.c +++ b/common/USB_AL94/usbd_conf.c @@ -29,7 +29,7 @@ #include "usb.h" #else // #include "usb_otg.h" -#include +#include "BoardConfig.h" #endif /* USER CODE END Includes */ diff --git a/common/Varmint.cpp b/common/Varmint.cpp index c38b5be..24dded0 100644 --- a/common/Varmint.cpp +++ b/common/Varmint.cpp @@ -34,9 +34,9 @@ * ****************************************************************************** **/ -#include +#include "Varmint.h" -#include +#include "Time64.h" #include diff --git a/common/Varmint.h b/common/Varmint.h index e59b216..ed7e608 100644 --- a/common/Varmint.h +++ b/common/Varmint.h @@ -38,25 +38,26 @@ #ifndef VARMINT_H_ #define VARMINT_H_ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "Adc.h" +#include "Adis165xx.h" +#include "Auav.h" +#include "Bmi088.h" +#include "DlhrL20G.h" +#include "Dps310.h" +#include "Iis2mdc.h" +#include "Ist8308.h" +#include "Mcp4017.h" +#include "Ms4525.h" +#include "Pwm.h" +#include "Sbus.h" +#include "Sd.h" +#include "Telem.h" +#include "Ubx.h" +#include "Vcp.h" #include "interface/board.h" -#include +#include "BoardConfig.h" + /* * diff --git a/common/drivers/Adc.cpp b/common/drivers/Adc.cpp index d0494b4..ec85223 100644 --- a/common/drivers/Adc.cpp +++ b/common/drivers/Adc.cpp @@ -35,13 +35,13 @@ ****************************************************************************** **/ -#include +#include "BoardConfig.h" -#include +#include "Adc.h" -#include -#include -#include +#include "Packets.h" +#include "Time64.h" +#include "misc.h" extern Time64 time64; diff --git a/common/drivers/Adc.h b/common/drivers/Adc.h index 716ca54..af27eb2 100644 --- a/common/drivers/Adc.h +++ b/common/drivers/Adc.h @@ -38,8 +38,8 @@ #ifndef ADC_H_ #define ADC_H_ -#include -#include +#include "BoardConfig.h" +#include "Driver.h" typedef struct __attribute__((__packed__)) { diff --git a/common/drivers/Adis165xx.cpp b/common/drivers/Adis165xx.cpp index 6def3d1..f8327b6 100644 --- a/common/drivers/Adis165xx.cpp +++ b/common/drivers/Adis165xx.cpp @@ -35,10 +35,10 @@ ****************************************************************************** **/ -#include -#include -#include -#include +#include "Adis165xx.h" +#include "Packets.h" +#include "Time64.h" +#include "misc.h" #define ADIS_OK (0x0000) diff --git a/common/drivers/Adis165xx.h b/common/drivers/Adis165xx.h index ca88602..67945e9 100644 --- a/common/drivers/Adis165xx.h +++ b/common/drivers/Adis165xx.h @@ -38,9 +38,9 @@ #ifndef ADIS165XX_H_ #define ADIS165XX_H_ -#include -#include -#include +#include "BoardConfig.h" +#include "Driver.h" +#include "Spi.h" class Adis165xx : public Driver { diff --git a/common/drivers/Auav.cpp b/common/drivers/Auav.cpp index 2632a8d..3437f80 100644 --- a/common/drivers/Auav.cpp +++ b/common/drivers/Auav.cpp @@ -34,11 +34,11 @@ * ****************************************************************************** **/ -#include -#include -#include -#include -#include +#include "Auav.h" +#include "Packets.h" +#include "Polling.h" +#include "Time64.h" +#include "misc.h" extern Time64 time64; diff --git a/common/drivers/Auav.h b/common/drivers/Auav.h index ce4aef2..0d504fd 100644 --- a/common/drivers/Auav.h +++ b/common/drivers/Auav.h @@ -40,9 +40,9 @@ #ifndef AUAV_H_ #define AUAV_H_ -#include -#include -#include +#include "BoardConfig.h" +#include "Driver.h" +#include "Spi.h" #define AUAV_CMD_BYTES 3 diff --git a/common/drivers/Bmi088.cpp b/common/drivers/Bmi088.cpp index 7743b2e..56ea480 100644 --- a/common/drivers/Bmi088.cpp +++ b/common/drivers/Bmi088.cpp @@ -35,12 +35,12 @@ ****************************************************************************** **/ -#include -#include -#include -#include -#include -#include +#include "Bmi088.h" +#include "Bmi088_config.h" +#include "Packets.h" +#include "Time64.h" +#include "bmi08_defs.h" +#include "misc.h" #define SPI_READ (uint8_t) 0x80 #define SPI_WRITE (uint8_t) 0x00 diff --git a/common/drivers/Bmi088.h b/common/drivers/Bmi088.h index c1f00f9..1fe9c99 100644 --- a/common/drivers/Bmi088.h +++ b/common/drivers/Bmi088.h @@ -38,8 +38,8 @@ #ifndef BMI088_H_ #define BMI088_H_ -#include -#include +#include "Driver.h" +#include "Spi.h" /* * diff --git a/common/drivers/ByteFifo.h b/common/drivers/ByteFifo.h index 06bb771..de152fc 100644 --- a/common/drivers/ByteFifo.h +++ b/common/drivers/ByteFifo.h @@ -40,7 +40,7 @@ #include -#include +#include "Status.h" class ByteFifo : public Status { diff --git a/common/drivers/DlhrL20G.cpp b/common/drivers/DlhrL20G.cpp index c1dab3f..655a8ae 100644 --- a/common/drivers/DlhrL20G.cpp +++ b/common/drivers/DlhrL20G.cpp @@ -34,9 +34,10 @@ * ****************************************************************************** **/ -#include -#include -#include +#include "DlhrL20G.h" +#include "Time64.h" +#include "misc.h" + extern Time64 time64; #define DLHRL20G_OK (0x40) @@ -137,7 +138,6 @@ bool DlhrL20G::poll(uint64_t poll_counter) bool status = false; static bool previous_drdy = 0; bool current_drdy = HAL_GPIO_ReadPin(drdyPort_, drdyPin_); - if (poll_offset == 0) // polled sensor measurement start { dlhr_i2c_dma_buf[0] = cmdByte_; diff --git a/common/drivers/DlhrL20G.h b/common/drivers/DlhrL20G.h index beadb0d..5e209c1 100644 --- a/common/drivers/DlhrL20G.h +++ b/common/drivers/DlhrL20G.h @@ -38,10 +38,10 @@ #ifndef DLHRL20G_H_ #define DLHRL20G_H_ -#include -#include -#include -#include +#include "BoardConfig.h" +#include "Driver.h" +#include "Packets.h" +#include "Time64.h" #define DLHRL20G_I2C_ADDRESS (0x29) /* diff --git a/common/drivers/Dps310.cpp b/common/drivers/Dps310.cpp index ef5e1fe..127b585 100644 --- a/common/drivers/Dps310.cpp +++ b/common/drivers/Dps310.cpp @@ -35,10 +35,10 @@ ****************************************************************************** **/ -#include -#include -#include -#include +#include "Dps310.h" +#include "Packets.h" +#include "Time64.h" +#include "misc.h" #define DPS310_OK (0xE0D0) diff --git a/common/drivers/Dps310.h b/common/drivers/Dps310.h index cadc75b..87a44f9 100644 --- a/common/drivers/Dps310.h +++ b/common/drivers/Dps310.h @@ -38,10 +38,10 @@ #ifndef DPS310_H_ #define DPS310_H_ -#include -#include -#include -#include +#include "BoardConfig.h" +#include "Driver.h" +#include "Spi.h" +#include "Time64.h" /* * diff --git a/common/drivers/Driver.h b/common/drivers/Driver.h index 77179a1..f13f849 100644 --- a/common/drivers/Driver.h +++ b/common/drivers/Driver.h @@ -40,12 +40,12 @@ #include "stm32h7xx_hal.h" -#include -#include -#include -#include +#include "BoardConfig.h" +#include "PacketFifo.h" +#include "Polling.h" +#include "Status.h" -#include +#include class Driver : public Status { diff --git a/common/drivers/Iis2mdc.cpp b/common/drivers/Iis2mdc.cpp index c10a7a8..181aabd 100644 --- a/common/drivers/Iis2mdc.cpp +++ b/common/drivers/Iis2mdc.cpp @@ -35,10 +35,11 @@ ****************************************************************************** **/ -#include -#include -#include -#include +#include "Iis2mdc.h" +#include "Packets.h" +#include "Time64.h" +#include "misc.h" + extern Time64 time64; #define IIS2MDC_OK (0x0F) diff --git a/common/drivers/Iis2mdc.h b/common/drivers/Iis2mdc.h index 91b7530..24be154 100644 --- a/common/drivers/Iis2mdc.h +++ b/common/drivers/Iis2mdc.h @@ -38,9 +38,9 @@ #ifndef IIS2MDC_H_ #define IIS2MDC_H_ -#include -#include -#include +#include "BoardConfig.h" +#include "Driver.h" +#include "Spi.h" /* * diff --git a/common/drivers/Ist8308.cpp b/common/drivers/Ist8308.cpp index b6f3ac4..5a74e6b 100644 --- a/common/drivers/Ist8308.cpp +++ b/common/drivers/Ist8308.cpp @@ -35,10 +35,10 @@ ****************************************************************************** **/ -#include -#include +#include "Ist8308.h" +#include "misc.h" +#include "Time64.h" -#include extern Time64 time64; DMA_RAM uint8_t ist8308_i2c_dma_buf[I2C_DMA_MAX_BUFFER_SIZE]; diff --git a/common/drivers/Ist8308.h b/common/drivers/Ist8308.h index 83dcf98..90bfd61 100644 --- a/common/drivers/Ist8308.h +++ b/common/drivers/Ist8308.h @@ -38,10 +38,10 @@ #ifndef DRIVERS_IST8308_H_ #define DRIVERS_IST8308_H_ -#include -#include -#include -#include +#include "BoardConfig.h" +#include "Driver.h" +#include "Packets.h" +#include "Time64.h" class Ist8308 : public Driver { diff --git a/common/drivers/Mcp4017.h b/common/drivers/Mcp4017.h index edf4c60..c3941d9 100644 --- a/common/drivers/Mcp4017.h +++ b/common/drivers/Mcp4017.h @@ -40,9 +40,9 @@ #define MCP4017_I2C_ADDRESS (0x2F) -#include +#include "misc.h" +#include "Status.h" -#include /* * */ diff --git a/common/drivers/Mpu.cpp b/common/drivers/Mpu.cpp index 1690b34..91c755c 100644 --- a/common/drivers/Mpu.cpp +++ b/common/drivers/Mpu.cpp @@ -35,9 +35,9 @@ ****************************************************************************** **/ -#include +#include "Mpu.h" -#include +#include "BoardConfig.h" void MpuConfig(void) { diff --git a/common/drivers/Ms4525.cpp b/common/drivers/Ms4525.cpp index ad6fd0b..5495e89 100644 --- a/common/drivers/Ms4525.cpp +++ b/common/drivers/Ms4525.cpp @@ -34,9 +34,10 @@ * ****************************************************************************** **/ -#include -#include -#include +#include "Ms4525.h" +#include "Time64.h" +#include "misc.h" + extern Time64 time64; #define MS4525_OK (0x0000) diff --git a/common/drivers/Ms4525.h b/common/drivers/Ms4525.h index d159af2..d8dfabe 100644 --- a/common/drivers/Ms4525.h +++ b/common/drivers/Ms4525.h @@ -38,10 +38,10 @@ #ifndef MS4525_H_ #define MS4525_H_ -#include -#include -#include -#include +#include "BoardConfig.h" +#include "Driver.h" +#include "Packets.h" +#include "Time64.h" #define MS4525_I2C_ADDRESS (0x28) /* diff --git a/common/drivers/PacketFifo.h b/common/drivers/PacketFifo.h index fe00506..7811003 100644 --- a/common/drivers/PacketFifo.h +++ b/common/drivers/PacketFifo.h @@ -41,7 +41,7 @@ #include #include -#include +#include "Status.h" #define PACKET_FIFO_MAX_BUFFERS 128 diff --git a/common/drivers/Packets.h b/common/drivers/Packets.h index 1caab57..6b7a58e 100644 --- a/common/drivers/Packets.h +++ b/common/drivers/Packets.h @@ -38,7 +38,7 @@ #ifndef DRIVERPACKETS_H_ #define DRIVERPACKETS_H_ -#include +#include "Ubx.h" #include #define SERIAL_MAX_PAYLOAD_SIZE (256 + 8) // for MAVLINK1, really 255+8, added 1 byte to make it an even multiple of 8 diff --git a/common/drivers/Polling.cpp b/common/drivers/Polling.cpp index 309c1c3..dc6febe 100644 --- a/common/drivers/Polling.cpp +++ b/common/drivers/Polling.cpp @@ -36,9 +36,9 @@ * ****************************************************************************** **/ -#include -#include -#include +#include "BoardConfig.h" +#include "Polling.h" +#include "stdint.h" PollingState PollingStateLookup(PollingStateStruct * ps, uint32_t size, uint32_t poll_index) { diff --git a/common/drivers/Pwm.cpp b/common/drivers/Pwm.cpp index 9d88a8c..dc062dd 100644 --- a/common/drivers/Pwm.cpp +++ b/common/drivers/Pwm.cpp @@ -35,9 +35,9 @@ ****************************************************************************** **/ -#include -#include -#include +#include "BoardConfig.h" +#include "Driver.h" +#include "Pwm.h" // Notes on DSHOT // DSHOT Bitrate T1H T0H Bit(µs) Frame (µs) diff --git a/common/drivers/Pwm.h b/common/drivers/Pwm.h index 96a749a..bc99fba 100644 --- a/common/drivers/Pwm.h +++ b/common/drivers/Pwm.h @@ -38,9 +38,8 @@ #ifndef PWM_H_ #define PWM_H_ -#include - -#include +#include "BoardConfig.h" +#include "Status.h" #define PWM_DMA_BUFFER_LEN 96 diff --git a/common/drivers/Sbus.cpp b/common/drivers/Sbus.cpp index 8e5a699..4addf9c 100644 --- a/common/drivers/Sbus.cpp +++ b/common/drivers/Sbus.cpp @@ -35,10 +35,10 @@ ****************************************************************************** **/ -#include -#include -#include -#include +#include "Packets.h" +#include "Sbus.h" +#include "Time64.h" +#include "misc.h" extern Time64 time64; diff --git a/common/drivers/Sbus.h b/common/drivers/Sbus.h index 075de05..689923f 100644 --- a/common/drivers/Sbus.h +++ b/common/drivers/Sbus.h @@ -38,8 +38,8 @@ #ifndef SBUS_H_ #define SBUS_H_ -#include -#include +#include "BoardConfig.h" +#include "Driver.h" /* * diff --git a/common/drivers/Sd.cpp b/common/drivers/Sd.cpp index 35d563d..57580c8 100644 --- a/common/drivers/Sd.cpp +++ b/common/drivers/Sd.cpp @@ -35,11 +35,11 @@ ****************************************************************************** **/ -#include -#include +#include "Driver.h" +#include "Sd.h" +#include "Time64.h" +#include "misc.h" -#include -#include #include extern Time64 time64; @@ -71,6 +71,7 @@ uint32_t Sd::init(SD_HandleTypeDef * hsd, SD_TypeDef * hsd_instance) initializationStatus_ |= DRIVER_HAL_ERROR; return initializationStatus_; } + HAL_SD_CardInfoTypeDef sd_info; hal_status = HAL_SD_GetCardInfo(hsd_, &sd_info); if (hal_status != HAL_OK) { @@ -83,6 +84,7 @@ uint32_t Sd::init(SD_HandleTypeDef * hsd, SD_TypeDef * hsd_instance) misc_printf("SD Card Capacity= %.0f GB, State = %lu\n", (double) sd_info.BlockNbr * (double) sd_info.BlockSize / 1024. / 1024. / 1024., sd_state); } + return initializationStatus_; } @@ -91,7 +93,7 @@ uint32_t Sd::init(SD_HandleTypeDef * hsd, SD_TypeDef * hsd_instance) bool Sd::read(uint8_t * dest, size_t len) { uint16_t Nblocks = (len + SD_CRC_BYTES + SD_BLKSIZE - 1) / SD_BLKSIZE; - // if(Nblocks > sd_info.BlockNbr) Nblocks = sd_info.BlockNbr; + // if(Nblocks > sd_info.BlockNbr) Nblocks = sd_info.BlockNbr; if (Nblocks > SD_MAXBLKS) { return 0; } // too large and don't want to be here forever, throw an error HAL_StatusTypeDef hal_status; @@ -118,11 +120,13 @@ bool Sd::read(uint8_t * dest, size_t len) return rxComplete_; } + bool Sd::write(uint8_t * src, size_t len) { uint16_t Nblocks = (len + SD_CRC_BYTES + SD_BLKSIZE - 1) / SD_BLKSIZE; - // if(Nblocks > sd_info.BlockNbr) Nblocks = sd_info.BlockNbr; + // if(Nblocks > sd_info.BlockNbr) Nblocks = sd_info.BlockNbr; if (Nblocks > SD_MAXBLKS) return 0; // too large and don't want to be here forever, throw an error + HAL_StatusTypeDef hal_status; txComplete_ = false; diff --git a/common/drivers/Sd.h b/common/drivers/Sd.h index 777e7ce..4327f4e 100644 --- a/common/drivers/Sd.h +++ b/common/drivers/Sd.h @@ -38,7 +38,7 @@ #ifndef SD_H_ #define SD_H_ -#include +#include "BoardConfig.h" /* * diff --git a/common/drivers/Spi.h b/common/drivers/Spi.h index 427583e..442b1b5 100644 --- a/common/drivers/Spi.h +++ b/common/drivers/Spi.h @@ -42,10 +42,9 @@ #include // for memset -#include - -#include -#include +#include "Time64.h" +#include "BoardConfig.h" +#include "Status.h" extern Time64 time64; diff --git a/common/drivers/Telem.cpp b/common/drivers/Telem.cpp index 00e411a..6f4144f 100644 --- a/common/drivers/Telem.cpp +++ b/common/drivers/Telem.cpp @@ -35,15 +35,14 @@ ****************************************************************************** **/ -#include - -#include -#include +#include "Telem.h" +#include "Time64.h" +#include "misc.h" #include -#include -#include +#include "Callbacks.h" +#include "Packets.h" extern Time64 time64; diff --git a/common/drivers/Telem.h b/common/drivers/Telem.h index 1081dad..1f76db5 100644 --- a/common/drivers/Telem.h +++ b/common/drivers/Telem.h @@ -38,11 +38,11 @@ #ifndef TELEM_H_ #define TELEM_H_ -#include -#include -#include -#include -#include +#include "BoardConfig.h" +#include "ByteFifo.h" +#include "Driver.h" +#include "Packets.h" +#include "Time64.h" extern Time64 time64; enum DmaItType diff --git a/common/drivers/Time64.h b/common/drivers/Time64.h index b22f41c..3699e1b 100644 --- a/common/drivers/Time64.h +++ b/common/drivers/Time64.h @@ -38,9 +38,9 @@ #ifndef TIME64_H_ #define TIME64_H_ -#include -#include -#include +#include "BoardConfig.h" +#include "Driver.h" +#include "Status.h" #include class Time64 : public Status diff --git a/common/drivers/Ubx.cpp b/common/drivers/Ubx.cpp index ac2f1ed..3da5dd0 100644 --- a/common/drivers/Ubx.cpp +++ b/common/drivers/Ubx.cpp @@ -35,12 +35,12 @@ ****************************************************************************** **/ -#include +#include "Ubx.h" -#include +#include "Time64.h" -#include -#include +#include "Packets.h" +#include "misc.h" extern Time64 time64; diff --git a/common/drivers/Ubx.h b/common/drivers/Ubx.h index 98d592a..c23e37d 100644 --- a/common/drivers/Ubx.h +++ b/common/drivers/Ubx.h @@ -38,8 +38,8 @@ #ifndef UBX_H_ #define UBX_H_ -#include -#include +#include "BoardConfig.h" +#include "Driver.h" typedef enum { diff --git a/common/drivers/Vcp.cpp b/common/drivers/Vcp.cpp index b82b866..4542ff7 100644 --- a/common/drivers/Vcp.cpp +++ b/common/drivers/Vcp.cpp @@ -35,14 +35,14 @@ ****************************************************************************** **/ -#include -#include -#include +#include "BoardConfig.h" +#include "Packets.h" +#include "Vcp.h" -#include +#include "usb_device.h" -#include -#include +#include "Time64.h" +#include "usbd_cdc_if.h" extern Time64 time64; diff --git a/common/drivers/Vcp.h b/common/drivers/Vcp.h index bf79626..2176386 100644 --- a/common/drivers/Vcp.h +++ b/common/drivers/Vcp.h @@ -38,9 +38,9 @@ #ifndef VCP_H_ #define VCP_H_ -#include -#include -#include +#include "BoardConfig.h" +#include "ByteFifo.h" +#include "Packets.h" /** * @class Vcp diff --git a/common/drivers/misc.cpp b/common/drivers/misc.cpp index a1203d8..0dfa776 100644 --- a/common/drivers/misc.cpp +++ b/common/drivers/misc.cpp @@ -35,14 +35,14 @@ ****************************************************************************** **/ -#include +#include "BoardConfig.h" #include #include #include -#include -#include +#include "usb_device.h" +#include "usbd_cdc_if.h" -#include +#include "misc.h" extern bool verbose; diff --git a/pixracer_pro/.cproject b/pixracer_pro/.cproject index 78e4c58..b79015b 100644 --- a/pixracer_pro/.cproject +++ b/pixracer_pro/.cproject @@ -119,35 +119,6 @@ - - - - @@ -194,6 +165,7 @@ @@ -215,6 +187,7 @@ + @@ -236,6 +209,7 @@ + diff --git a/pixracer_pro/.settings/language.settings.xml b/pixracer_pro/.settings/language.settings.xml index 9d5d4f5..5d746fd 100644 --- a/pixracer_pro/.settings/language.settings.xml +++ b/pixracer_pro/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/pixracer_pro/Core/Src/main.c b/pixracer_pro/Core/Src/main.c index 751b523..b22eca0 100644 --- a/pixracer_pro/Core/Src/main.c +++ b/pixracer_pro/Core/Src/main.c @@ -100,7 +100,7 @@ PCD_HandleTypeDef hpcd_USB_OTG_FS; /* USER CODE BEGIN PV */ -#include +#include "BoardConfig.h" #if 0 /* USER CODE END PV */ diff --git a/pixracer_pro/Core/Src/stm32h7xx_it.c b/pixracer_pro/Core/Src/stm32h7xx_it.c index 72174dc..5e07b17 100644 --- a/pixracer_pro/Core/Src/stm32h7xx_it.c +++ b/pixracer_pro/Core/Src/stm32h7xx_it.c @@ -22,8 +22,8 @@ #include "stm32h7xx_it.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ -#include -#include +#include "Callbacks.h" +#include "BoardConfig.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/pixracer_pro/specific/BoardConfig.h b/pixracer_pro/specific/BoardConfig.h index 9374a22..e2f2c42 100644 --- a/pixracer_pro/specific/BoardConfig.h +++ b/pixracer_pro/specific/BoardConfig.h @@ -38,7 +38,7 @@ #ifndef BOARDCONFIG_H_ #define BOARDCONFIG_H_ -#include +#include "CommonConfig.h" #define SANDBOX false #define BOARD_STATUS_PRINT false diff --git a/pixracer_pro/specific/Callbacks.cpp b/pixracer_pro/specific/Callbacks.cpp index 0eb9201..a520335 100644 --- a/pixracer_pro/specific/Callbacks.cpp +++ b/pixracer_pro/specific/Callbacks.cpp @@ -35,20 +35,18 @@ * ****************************************************************************** **/ - #include "stm32h743xx.h" - -#include +#include "Varmint.h" extern Varmint varmint; -#include +#include "Time64.h" extern Time64 time64; -#include +#include "Callbacks.h" -#include +#include "BoardConfig.h" -#include +#include "Polling.h" ////////////////////////////////////////////////////////////////////////////////////////// // High Rate (10kHz) Periodic Timer Interrupt Routine for Polling diff --git a/pixracer_pro/specific/Varmint_Init.cpp b/pixracer_pro/specific/Varmint_Init.cpp index 5709ffb..8d083bc 100644 --- a/pixracer_pro/specific/Varmint_Init.cpp +++ b/pixracer_pro/specific/Varmint_Init.cpp @@ -34,24 +34,24 @@ * ****************************************************************************** **/ -#include +#include "Varmint.h" -#include -#include -#include -#include +#include "BoardConfig.h" +#include "Spi.h" +#include "Time64.h" +#include "misc.h" -#include -#include +#include "usb_device.h" +#include "usbd_cdc_if.h" #include -#include +#include "main.h" -#include -#include -#include +#include "Callbacks.h" +#include "Polling.h" +#include "sandbox.h" -#include +#include "Mpu.h" bool verbose = BOARD_STATUS_PRINT; @@ -106,7 +106,7 @@ void Varmint::init_board(void) // MX_UART8_Init(); // Telem "FRSKY" connector // MX_USART1_UART_Init(); // Serial 5&6 connector, not used MX_USART2_UART_Init(); // Telem/Serial 1 - // MX_USART3_UART_Init(); // Serial 2 connector, not used + // MX_USART3_UART_Init(); // Serial 2 connector, not used // MX_USART6_UART_Init(); // RC UART, initialized elsewhere // MX_ADC3_Init(); // initialized elsewhere diff --git a/pixracer_pro/specific/sandbox.cpp b/pixracer_pro/specific/sandbox.cpp index cede9cf..952765c 100644 --- a/pixracer_pro/specific/sandbox.cpp +++ b/pixracer_pro/specific/sandbox.cpp @@ -35,12 +35,12 @@ ****************************************************************************** **/ -#include +#include "sandbox.h" -#include -#include +#include "BoardConfig.h" +#include "misc.h" -#include +#include "Varmint.h" extern Varmint varmint; extern Time64 time64; diff --git a/varmint_10X/.cproject b/varmint_10X/.cproject index 7c69334..d21b9f7 100644 --- a/varmint_10X/.cproject +++ b/varmint_10X/.cproject @@ -45,7 +45,6 @@ - @@ -73,7 +72,6 @@ - @@ -101,7 +99,6 @@ -