Removed SPRACINGF3OSD support.

This commit is contained in:
Michael Keller 2018-08-08 07:33:32 +12:00
parent efb340f4c6
commit 283e55e45d
16 changed files with 2 additions and 848 deletions

View File

@ -59,14 +59,7 @@ COMMON_SRC = \
sensors/battery.c \
sensors/current.c \
sensors/voltage.c \
target/config_helper.c
OSD_SLAVE_SRC = \
io/displayport_max7456.c \
osd_slave/osd_slave_init.c \
io/osd_slave.c
FC_SRC = \
target/config_helper.c \
fc/fc_init.c \
fc/controlrate_profile.c \
drivers/camera_control.c \
@ -176,12 +169,7 @@ COMMON_DEVICE_SRC = \
$(CMSIS_SRC) \
$(DEVICE_STDPERIPH_SRC)
ifeq ($(OSD_SLAVE),yes)
TARGET_FLAGS := -DUSE_OSD_SLAVE $(TARGET_FLAGS)
COMMON_SRC := $(COMMON_SRC) $(OSD_SLAVE_SRC) $(COMMON_DEVICE_SRC)
else
COMMON_SRC := $(COMMON_SRC) $(FC_SRC) $(COMMON_DEVICE_SRC)
endif
COMMON_SRC := $(COMMON_SRC) $(COMMON_DEVICE_SRC)
ifeq ($(SIMULATOR_BUILD),yes)
TARGET_FLAGS := -DSIMULATOR_BUILD $(TARGET_FLAGS)

View File

@ -2,7 +2,6 @@ OFFICIAL_TARGETS = ALIENFLIGHTF3 ALIENFLIGHTF4 ANYFCF7 BETAFLIGHTF3 BLUEJAYF4 F
ALT_TARGETS = $(sort $(filter-out target, $(basename $(notdir $(wildcard $(ROOT)/src/main/target/*/*.mk)))))
NOBUILD_TARGETS = $(sort $(filter-out target, $(basename $(notdir $(wildcard $(ROOT)/src/main/target/*/*.nomk)))))
OPBL_TARGETS = $(filter %_OPBL, $(ALT_TARGETS))
OSD_SLAVE_TARGETS = SPRACINGF3OSD
VALID_TARGETS = $(dir $(wildcard $(ROOT)/src/main/target/*/target.mk))
VALID_TARGETS := $(subst /,, $(subst ./src/main/target/,, $(VALID_TARGETS)))
@ -60,14 +59,6 @@ ifeq ($(filter $(TARGET),$(OPBL_TARGETS)), $(TARGET))
OPBL = yes
endif
ifeq ($(filter $(TARGET),$(OSD_SLAVE_TARGETS)), $(TARGET))
# build an OSD SLAVE
OSD_SLAVE = yes
else
# build an FC
FC = yes
endif
# silently ignore if the file is not present. Allows for target specific.
-include $(ROOT)/src/main/target/$(BASE_TARGET)/target.mk

View File

@ -123,7 +123,6 @@
#include "io/asyncfatfs/asyncfatfs.h"
#include "io/transponder_ir.h"
#include "io/osd.h"
#include "io/osd_slave.h"
#include "io/pidaudio.h"
#include "io/piniobox.h"
#include "io/displayport_msp.h"

View File

@ -65,7 +65,6 @@
#include "io/gps.h"
#include "io/ledstrip.h"
#include "io/osd.h"
#include "io/osd_slave.h"
#include "io/piniobox.h"
#include "io/serial.h"
#include "io/transponder_ir.h"

View File

@ -87,7 +87,6 @@
#include "io/ledstrip.h"
#include "io/motors.h"
#include "io/osd.h"
#include "io/osd_slave.h"
#include "io/serial.h"
#include "io/serial_4way.h"
#include "io/servos.h"

View File

@ -34,7 +34,6 @@
#include "io/displayport_max7456.h"
#include "io/osd.h"
#include "io/osd_slave.h"
#include "pg/max7456.h"
#include "pg/pg.h"

View File

@ -1,176 +0,0 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
Created by Dominic Clifton
*/
#include <stdbool.h>
#include <stdint.h>
#include "platform.h"
#ifdef USE_OSD_SLAVE
#include "build/debug.h"
#include "build/version.h"
#include "common/printf.h"
#include "common/utils.h"
#include "drivers/display.h"
#include "drivers/max7456_symbols.h"
#include "drivers/time.h"
#include "io/osd_slave.h"
//#define OSD_SLAVE_DEBUG
// when locked the system ignores requests to enter cli or bootloader mode via serial connection.
bool osdSlaveIsLocked = false;
static displayPort_t *osdDisplayPort;
static void osdDrawLogo(int x, int y)
{
char fontOffset = 160;
for (int row = 0; row < 4; row++) {
for (int column = 0; column < 24; column++) {
if (fontOffset != 255) // FIXME magic number
displayWriteChar(osdDisplayPort, x + column, y + row, fontOffset++);
}
}
}
bool displayDrawScreenQueued = false;
bool receivingScreen = false;
bool stalled = false;
void osdSlaveDrawScreen(void)
{
displayDrawScreenQueued = true;
}
static uint32_t timeoutAt = 0;
void osdSlaveClearScreen(void)
{
displayClearScreen(osdDisplayPort);
receivingScreen = true;
}
void osdSlaveWriteChar(const uint8_t x, const uint8_t y, const uint8_t c)
{
displayWriteChar(osdDisplayPort, x, y, c);
}
void osdSlaveWrite(const uint8_t x, const uint8_t y, const char *s)
{
displayWrite(osdDisplayPort, x, y, s);
}
void osdSlaveHeartbeat(void)
{
timeoutAt = micros() + (1000 * 1000);
if (stalled) {
stalled = false;
displayResync(osdDisplayPort);
}
}
void osdSlaveInit(displayPort_t *osdDisplayPortToUse)
{
if (!osdDisplayPortToUse)
return;
osdDisplayPort = osdDisplayPortToUse;
delay(100); // need max7456 to be ready before using the displayPort API further.
displayClearScreen(osdDisplayPort);
displayResync(osdDisplayPort);
delay(100); // wait a little for video to stabilise
osdDrawLogo(3, 1);
char string_buffer[30];
tfp_sprintf(string_buffer, "V%s", FC_VERSION_STRING);
displayWrite(osdDisplayPort, 20, 6, string_buffer);
displayWrite(osdDisplayPort, 13, 6, "OSD");
displayResync(osdDisplayPort);
}
bool osdSlaveInitialized(void)
{
return osdDisplayPort;
}
bool osdSlaveCheck(timeUs_t currentTimeUs, timeDelta_t currentDeltaTimeUs)
{
UNUSED(currentTimeUs);
UNUSED(currentDeltaTimeUs);
if (!stalled && (cmp32(currentTimeUs, timeoutAt) > 0)) {
stalled = true;
displayWrite(osdDisplayPort, 8, 12, "WAITING FOR FC");
displayResync(osdDisplayPort);
}
if (!receivingScreen && !displayIsSynced(osdDisplayPort)) {
// queue a screen draw to ensure any remaining characters not written to the screen yet
// remember that displayDrawScreen() may return WITHOUT having fully updated the screen.
displayDrawScreenQueued = true;
}
return receivingScreen || displayDrawScreenQueued;
}
/*
* Called periodically by the scheduler
*/
void osdSlaveUpdate(timeUs_t currentTimeUs)
{
UNUSED(currentTimeUs);
#ifdef MAX7456_DMA_CHANNEL_TX
// don't touch buffers if DMA transaction is in progress
if (displayIsTransferInProgress(osdDisplayPort)) {
return;
}
#endif // MAX7456_DMA_CHANNEL_TX
#ifdef OSD_SLAVE_DEBUG
char buff[32];
for (int i = 0; i < 4; i ++) {
tfp_sprintf(buff, "%5d", debug[i]);
displayWrite(osdDisplayPort, i * 8, 0, buff);
}
#endif
if (displayDrawScreenQueued) {
displayDrawScreen(osdDisplayPort);
displayDrawScreenQueued = false;
receivingScreen = false;
}
}
#endif // OSD_SLAVE

View File

@ -1,46 +0,0 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifdef USE_OSD_SLAVE
#include "common/time.h"
struct displayPort_s;
extern bool osdSlaveIsLocked;
// init
void osdSlaveInit(struct displayPort_s *osdDisplayPort);
bool osdSlaveInitialized(void);
// task api
bool osdSlaveCheck(timeUs_t currentTimeUs, timeDelta_t currentDeltaTimeUs);
void osdSlaveUpdate(timeUs_t currentTimeUs);
// msp api
void osdSlaveHeartbeat(void);
void osdSlaveClearScreen(void);
void osdSlaveWriteChar(const uint8_t x, const uint8_t y, const uint8_t c);
void osdSlaveWrite(const uint8_t x, const uint8_t y, const char *s);
void osdSlaveDrawScreen(void);
#endif

View File

@ -1,308 +0,0 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "platform.h"
#include "blackbox/blackbox.h"
#include "common/axis.h"
#include "common/color.h"
#include "common/maths.h"
#include "common/printf.h"
#include "config/config_eeprom.h"
#include "config/feature.h"
#include "drivers/adc.h"
#include "drivers/bus.h"
#include "drivers/bus_i2c.h"
#include "drivers/bus_spi.h"
#include "drivers/dma.h"
#include "drivers/exti.h"
#include "drivers/inverter.h"
#include "drivers/io.h"
#include "drivers/light_led.h"
#include "drivers/nvic.h"
#include "drivers/sensor.h"
#include "drivers/serial.h"
#include "drivers/serial_softserial.h"
#include "drivers/serial_uart.h"
#include "drivers/sound_beeper.h"
#include "drivers/system.h"
#include "drivers/time.h"
#include "drivers/timer.h"
#include "drivers/transponder_ir.h"
#include "drivers/usb_io.h"
#include "fc/config.h"
#include "fc/rc_controls.h"
#include "fc/fc_tasks.h"
#include "fc/runtime_config.h"
#include "interface/cli.h"
#include "interface/msp.h"
#include "msp/msp_serial.h"
#include "io/beeper.h"
#include "io/displayport_max7456.h"
#include "io/flashfs.h"
#include "io/ledstrip.h"
#include "io/osd_slave.h"
#include "io/serial.h"
#include "io/transponder_ir.h"
#include "osd_slave/osd_slave_init.h"
#include "pg/adc.h"
#include "pg/bus_i2c.h"
#include "pg/bus_spi.h"
#include "pg/pg.h"
#include "pg/pg_ids.h"
#include "pg/vcd.h"
#include "scheduler/scheduler.h"
#include "sensors/acceleration.h"
#include "sensors/barometer.h"
#include "sensors/battery.h"
#ifdef USE_HARDWARE_REVISION_DETECTION
#include "hardware_revision.h"
#endif
#include "build/build_config.h"
#include "build/debug.h"
#ifdef TARGET_PREINIT
void targetPreInit(void);
#endif
uint8_t systemState = SYSTEM_STATE_INITIALISING;
void processLoopback(void)
{
}
#ifdef BUS_SWITCH_PIN
void busSwitchInit(void)
{
static IO_t busSwitchResetPin = IO_NONE;
busSwitchResetPin = IOGetByTag(IO_TAG(BUS_SWITCH_PIN));
IOInit(busSwitchResetPin, OWNER_SYSTEM, 0);
IOConfigGPIO(busSwitchResetPin, IOCFG_OUT_PP);
// ENABLE
IOLo(busSwitchResetPin);
}
#endif
void init(void)
{
#ifdef USE_HAL_DRIVER
HAL_Init();
#endif
printfSupportInit();
systemInit();
// initialize IO (needed for all IO operations)
IOInitGlobal();
#ifdef USE_HARDWARE_REVISION_DETECTION
detectHardwareRevision();
#endif
initEEPROM();
ensureEEPROMStructureIsValid();
readEEPROM();
systemState |= SYSTEM_STATE_CONFIG_LOADED;
debugMode = systemConfig()->debug_mode;
// Latch active features to be used for feature() in the remainder of init().
latchActiveFeatures();
#ifdef TARGET_PREINIT
targetPreInit();
#endif
ledInit(statusLedConfig());
LED2_ON;
#ifdef USE_EXTI
EXTIInit();
#endif
delay(100);
timerInit(); // timer must be initialized before any channel is allocated
#ifdef BUS_SWITCH_PIN
busSwitchInit();
#endif
#if defined(USE_UART) && !defined(SIMULATOR_BUILD)
uartPinConfigure(serialPinConfig());
#endif
serialInit(false, SERIAL_PORT_NONE);
#ifdef USE_BEEPER
beeperInit(beeperDevConfig());
#endif
/* temp until PGs are implemented. */
#ifdef USE_INVERTER
initInverters();
#endif
#ifdef TARGET_BUS_INIT
targetBusInit();
#else
#ifdef USE_SPI
spiPinConfigure(spiPinConfig(0));
// Initialize CS lines and keep them high
spiPreInit();
#ifdef USE_SPI_DEVICE_1
spiInit(SPIDEV_1);
#endif
#ifdef USE_SPI_DEVICE_2
spiInit(SPIDEV_2);
#endif
#ifdef USE_SPI_DEVICE_3
spiInit(SPIDEV_3);
#endif
#ifdef USE_SPI_DEVICE_4
spiInit(SPIDEV_4);
#endif
#endif /* USE_SPI */
#ifdef USE_I2C
i2cHardwareConfigure(i2cConfig(0));
// Note: Unlike UARTs which are configured when client is present,
// I2C buses are initialized unconditionally if they are configured.
#ifdef USE_I2C_DEVICE_1
i2cInit(I2CDEV_1);
#endif
#ifdef USE_I2C_DEVICE_2
i2cInit(I2CDEV_2);
#endif
#ifdef USE_I2C_DEVICE_3
i2cInit(I2CDEV_3);
#endif
#ifdef USE_I2C_DEVICE_4
i2cInit(I2CDEV_4);
#endif
#endif /* USE_I2C */
#endif /* TARGET_BUS_INIT */
#ifdef USE_HARDWARE_REVISION_DETECTION
updateHardwareRevision();
#endif
#ifdef USE_ADC
adcConfigMutable()->vbat.enabled = (batteryConfig()->voltageMeterSource == VOLTAGE_METER_ADC);
adcConfigMutable()->current.enabled = (batteryConfig()->currentMeterSource == CURRENT_METER_ADC);
adcConfigMutable()->rssi.enabled = feature(FEATURE_RSSI_ADC);
adcInit(adcConfig());
#endif
LED1_ON;
LED0_OFF;
LED2_OFF;
for (int i = 0; i < 10; i++) {
LED1_TOGGLE;
LED0_TOGGLE;
#if defined(USE_BEEPER)
delay(25);
if (!(beeperConfig()->beeper_off_flags & BEEPER_GET_FLAG(BEEPER_SYSTEM_INIT))) BEEP_ON;
delay(25);
BEEP_OFF;
#else
delay(50);
#endif
}
LED0_OFF;
LED1_OFF;
mspInit();
mspSerialInit();
#ifdef USE_CLI
cliInit(serialConfig());
#endif
displayPort_t *osdDisplayPort = NULL;
#if defined(USE_MAX7456)
// If there is a max7456 chip for the OSD then use it
osdDisplayPort = max7456DisplayPortInit(vcdProfile());
// osdInit will register with CMS by itself.
osdSlaveInit(osdDisplayPort);
#endif
#ifdef USE_LED_STRIP
ledStripInit();
if (feature(FEATURE_LED_STRIP)) {
ledStripEnable();
}
#endif
#ifdef USE_USB_DETECT
usbCableDetectInit();
#endif
#ifdef USE_TRANSPONDER
if (feature(FEATURE_TRANSPONDER)) {
transponderInit();
transponderStartRepeating();
systemState |= SYSTEM_STATE_TRANSPONDER_ENABLED;
}
#endif
timerStart();
batteryInit();
// Latch active features AGAIN since some may be modified by init().
latchActiveFeatures();
fcTasksInit();
systemState |= SYSTEM_STATE_READY;
}

View File

@ -1,32 +0,0 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
typedef enum {
SYSTEM_STATE_INITIALISING = 0,
SYSTEM_STATE_CONFIG_LOADED = (1 << 0),
SYSTEM_STATE_TRANSPONDER_ENABLED = (1 << 3),
SYSTEM_STATE_READY = (1 << 7)
} systemState_e;
extern uint8_t systemState;
void init(void);

View File

@ -106,12 +106,7 @@
#error "Invalid chipset specified. Update platform.h"
#endif
#ifdef USE_OSD_SLAVE
#include "target/common_osd_slave.h"
#include "target.h"
#else
#include "target/common_fc_pre.h"
#include "target.h"
#include "target/common_fc_post.h"
#endif
#include "target/common_defaults_post.h"

View File

@ -1,39 +0,0 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdbool.h>
#include <stdint.h>
#include "platform.h"
#include "drivers/serial.h"
#include "io/serial.h"
#include "config/feature.h"
#include "fc/config.h"
#ifdef USE_TARGET_CONFIG
void targetConfiguration(void)
{
serialConfigMutable()->portConfigs[1].functionMask = FUNCTION_MSP; // To connect to FC.
}
#endif

View File

@ -1,38 +0,0 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include "platform.h"
#include "drivers/io.h"
#include "drivers/timer.h"
#include "drivers/timer_def.h"
#include "drivers/dma.h"
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0), // DMA1_Channel2
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0), // DMA1_Channel4
DEF_TIM(TIM16, CH1, PB4, TIM_USE_MOTOR, 0), // DMA1_Channel3 or DMA1_Channel6 with Remap (need remap to free SPI1_TX for Flash)
DEF_TIM(TIM17, CH1, PB5, TIM_USE_MOTOR, 0), // DMA1_Channel1 or DMA1_Channel7 with Remap (need remap, ADC1 is on DMA1_Channel1)
DEF_TIM(TIM1, CH1, PA8, TIM_USE_TRANSPONDER, 0),
};

View File

@ -1,103 +0,0 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define TARGET_BOARD_IDENTIFIER "SOF3"
#define USE_TARGET_CONFIG
#define LED0_PIN PA15
#define USE_EXTI
#define USE_GYRO
#define USE_FAKE_GYRO
#define USE_ACC
#define USE_FAKE_ACC
#define REMAP_TIM16_DMA
#define REMAP_TIM17_DMA
#define USE_VCP
#define USE_UART1
#define USE_UART3
#define SERIAL_PORT_COUNT 3
#define UART1_TX_PIN PA9
#define UART1_RX_PIN PA10
#define BUS_SWITCH_PIN PB3 // connects and disconnects UART1 from external devices
#define UART3_TX_PIN PB10
#define UART3_RX_PIN PB11
#define USE_I2C
#define USE_I2C_DEVICE_1
#define I2C_DEVICE (I2CDEV_1)
#define USE_SPI
#define USE_SPI_DEVICE_1 // Flash Chip
#define USE_SPI_DEVICE_2 // MAX7456
#define SPI1_NSS_PIN PA4
#define SPI1_SCK_PIN PA5
#define SPI1_MISO_PIN PA6
#define SPI1_MOSI_PIN PA7
#define SPI2_NSS_PIN PB12
#define SPI2_SCK_PIN PB13
#define SPI2_MISO_PIN PB14
#define SPI2_MOSI_PIN PB15
#define USE_MAX7456
#define MAX7456_SPI_INSTANCE SPI2
#define MAX7456_SPI_CS_PIN SPI2_NSS_PIN
#define MAX7456_NRST_PIN PB2
#define MAX7456_DMA_CHANNEL_TX DMA1_Channel5
#define MAX7456_DMA_CHANNEL_RX DMA1_Channel4
#define MAX7456_DMA_IRQ_HANDLER_ID DMA1_CH4_HANDLER
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
#define USE_ADC
#define ADC_INSTANCE ADC1
#define VBAT_ADC_PIN PA2
#define CURRENT_METER_ADC_PIN PA3
#define VOLTAGE_12V_ADC_PIN PA0
#define VOLTAGE_5V_ADC_PIN PA1
#define USE_TRANSPONDER
#define DEFAULT_FEATURES (FEATURE_TRANSPONDER)
// IO - assuming 303 in 64pin package, TODO
#define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD (BIT(2))
#define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
#define USABLE_TIMER_CHANNEL_COUNT 12 // 2xPPM, 6xPWM, UART3 RX/TX, LED Strip, IR.
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) | TIM_N(15) | TIM_N(16))

View File

@ -1,6 +0,0 @@
F3_TARGETS += $(TARGET)
FEATURES = VCP SDCARD
TARGET_SRC = \
drivers/accgyro/accgyro_fake.c \
drivers/max7456.c

View File

@ -1,68 +0,0 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define USE_PARAMETER_GROUPS
// type conversion warnings.
// -Wconversion can be turned on to enable the process of eliminating these warnings
//#pragma GCC diagnostic warning "-Wconversion"
#pragma GCC diagnostic ignored "-Wsign-conversion"
// -Wpadded can be turned on to check padding of structs
//#pragma GCC diagnostic warning "-Wpadded"
//#define SCHEDULER_DEBUG // define this to use scheduler debug[] values. Undefined by default for performance reasons
#define DEBUG_MODE DEBUG_NONE // change this to change initial debug mode
#define I2C1_OVERCLOCK true
#define I2C2_OVERCLOCK true
#define MAX_PROFILE_COUNT 0
#ifdef STM32F1
#define MINIMAL_CLI
#endif
#ifdef STM32F3
#define MINIMAL_CLI
#endif
#ifdef STM32F4
#define I2C3_OVERCLOCK true
#endif
#ifdef STM32F7
#define I2C3_OVERCLOCK true
#define I2C4_OVERCLOCK true
#endif
#if defined(STM32F4) || defined(STM32F7)
#define SCHEDULER_DELAY_LIMIT 10
#else
#define SCHEDULER_DELAY_LIMIT 100
#endif
#define FAST_CODE
#define FAST_CODE_NOINLINE
#define FAST_RAM_ZERO_INIT
#define FAST_RAM
//CLI needs FC dependencies removed before we can compile it, disabling for now
//#define USE_CLI