Moved sdcard parameter group to `pg/`.
This commit is contained in:
parent
f4ba99c6b7
commit
d82c72bc54
|
@ -64,8 +64,9 @@ COMMON_SRC = \
|
||||||
pg/bus_i2c.c \
|
pg/bus_i2c.c \
|
||||||
pg/flash.c \
|
pg/flash.c \
|
||||||
pg/max7456.c \
|
pg/max7456.c \
|
||||||
pg/rx_pwm.c \
|
|
||||||
pg/pg.c \
|
pg/pg.c \
|
||||||
|
pg/rx_pwm.c \
|
||||||
|
pg/sdcard.c \
|
||||||
scheduler/scheduler.c \
|
scheduler/scheduler.c \
|
||||||
sensors/battery.c \
|
sensors/battery.c \
|
||||||
sensors/current.c \
|
sensors/current.c \
|
||||||
|
|
|
@ -41,10 +41,9 @@
|
||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
|
|
||||||
#include "config/feature.h"
|
#include "config/feature.h"
|
||||||
#include "pg/pg.h"
|
|
||||||
#include "pg/pg_ids.h"
|
|
||||||
|
|
||||||
#include "drivers/time.h"
|
#include "drivers/time.h"
|
||||||
|
#include "drivers/sdcard.h"
|
||||||
|
|
||||||
#include "fc/config.h"
|
#include "fc/config.h"
|
||||||
|
|
||||||
|
@ -52,6 +51,8 @@
|
||||||
#include "io/flashfs.h"
|
#include "io/flashfs.h"
|
||||||
#include "io/beeper.h"
|
#include "io/beeper.h"
|
||||||
|
|
||||||
|
#include "pg/pg.h"
|
||||||
|
|
||||||
static const char * const cmsx_BlackboxDeviceNames[] = {
|
static const char * const cmsx_BlackboxDeviceNames[] = {
|
||||||
"NONE",
|
"NONE",
|
||||||
"FLASH ",
|
"FLASH ",
|
||||||
|
|
|
@ -20,10 +20,6 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
typedef struct sdcardConfig_s {
|
|
||||||
uint8_t useDma;
|
|
||||||
} sdcardConfig_t;
|
|
||||||
|
|
||||||
typedef struct sdcardMetadata_s {
|
typedef struct sdcardMetadata_s {
|
||||||
uint32_t numBlocks; /* Card capacity in 512-byte blocks*/
|
uint32_t numBlocks; /* Card capacity in 512-byte blocks*/
|
||||||
uint16_t oemID;
|
uint16_t oemID;
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
#include "drivers/pwm_esc_detect.h"
|
#include "drivers/pwm_esc_detect.h"
|
||||||
#include "drivers/pwm_output.h"
|
#include "drivers/pwm_output.h"
|
||||||
#include "drivers/rx_spi.h"
|
#include "drivers/rx_spi.h"
|
||||||
#include "drivers/sdcard.h"
|
|
||||||
#include "drivers/sensor.h"
|
#include "drivers/sensor.h"
|
||||||
#include "drivers/sound_beeper.h"
|
#include "drivers/sound_beeper.h"
|
||||||
#include "drivers/system.h"
|
#include "drivers/system.h"
|
||||||
|
@ -142,15 +141,6 @@ PG_RESET_TEMPLATE(systemConfig_t, systemConfig,
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_SDCARD
|
|
||||||
PG_REGISTER_WITH_RESET_TEMPLATE(sdcardConfig_t, sdcardConfig, PG_SDCARD_CONFIG, 0);
|
|
||||||
|
|
||||||
PG_RESET_TEMPLATE(sdcardConfig_t, sdcardConfig,
|
|
||||||
.useDma = false
|
|
||||||
);
|
|
||||||
#endif // USE_SDCARD
|
|
||||||
|
|
||||||
// no template required since defaults are zero
|
// no template required since defaults are zero
|
||||||
PG_REGISTER(vcdProfile_t, vcdProfile, PG_VCD_CONFIG, 0);
|
PG_REGISTER(vcdProfile_t, vcdProfile, PG_VCD_CONFIG, 0);
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "pg/pg.h"
|
#include "pg/pg.h"
|
||||||
|
|
||||||
#include "drivers/flash.h"
|
#include "drivers/flash.h"
|
||||||
#include "drivers/sdcard.h"
|
|
||||||
#include "drivers/serial.h"
|
#include "drivers/serial.h"
|
||||||
#include "drivers/bus_i2c.h"
|
#include "drivers/bus_i2c.h"
|
||||||
#include "drivers/sound_beeper.h"
|
#include "drivers/sound_beeper.h"
|
||||||
|
@ -84,7 +83,6 @@ PG_DECLARE(pilotConfig_t, pilotConfig);
|
||||||
PG_DECLARE(systemConfig_t, systemConfig);
|
PG_DECLARE(systemConfig_t, systemConfig);
|
||||||
PG_DECLARE(beeperDevConfig_t, beeperDevConfig);
|
PG_DECLARE(beeperDevConfig_t, beeperDevConfig);
|
||||||
PG_DECLARE(vcdProfile_t, vcdProfile);
|
PG_DECLARE(vcdProfile_t, vcdProfile);
|
||||||
PG_DECLARE(sdcardConfig_t, sdcardConfig);
|
|
||||||
|
|
||||||
struct pidProfile_s;
|
struct pidProfile_s;
|
||||||
extern struct pidProfile_s *currentPidProfile;
|
extern struct pidProfile_s *currentPidProfile;
|
||||||
|
|
|
@ -81,8 +81,8 @@
|
||||||
#include "pg/bus_i2c.h"
|
#include "pg/bus_i2c.h"
|
||||||
#include "pg/flash.h"
|
#include "pg/flash.h"
|
||||||
#include "pg/pg.h"
|
#include "pg/pg.h"
|
||||||
#include "pg/pg_ids.h"
|
|
||||||
#include "pg/rx_pwm.h"
|
#include "pg/rx_pwm.h"
|
||||||
|
#include "pg/sdcard.h"
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
#include "rx/rx_spi.h"
|
#include "rx/rx_spi.h"
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
#include "pg/pg.h"
|
#include "pg/pg.h"
|
||||||
#include "pg/pg_ids.h"
|
#include "pg/pg_ids.h"
|
||||||
#include "pg/rx_pwm.h"
|
#include "pg/rx_pwm.h"
|
||||||
|
#include "pg/sdcard.h"
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
#include "rx/cc2500_frsky_common.h"
|
#include "rx/cc2500_frsky_common.h"
|
||||||
|
|
|
@ -49,11 +49,10 @@
|
||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
|
|
||||||
#include "config/feature.h"
|
#include "config/feature.h"
|
||||||
#include "pg/pg.h"
|
|
||||||
#include "pg/pg_ids.h"
|
|
||||||
|
|
||||||
#include "drivers/display.h"
|
#include "drivers/display.h"
|
||||||
#include "drivers/max7456_symbols.h"
|
#include "drivers/max7456_symbols.h"
|
||||||
|
#include "drivers/sdcard.h"
|
||||||
#include "drivers/time.h"
|
#include "drivers/time.h"
|
||||||
|
|
||||||
#include "io/asyncfatfs/asyncfatfs.h"
|
#include "io/asyncfatfs/asyncfatfs.h"
|
||||||
|
@ -75,6 +74,9 @@
|
||||||
#include "flight/imu.h"
|
#include "flight/imu.h"
|
||||||
#include "flight/pid.h"
|
#include "flight/pid.h"
|
||||||
|
|
||||||
|
#include "pg/pg.h"
|
||||||
|
#include "pg/pg_ids.h"
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
|
|
||||||
#include "sensors/barometer.h"
|
#include "sensors/barometer.h"
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Cleanflight.
|
||||||
|
*
|
||||||
|
* Cleanflight is free software: you can redistribute it and/or modify
|
||||||
|
* it 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 is distributed in the hope that it 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
#ifdef USE_SDCARD
|
||||||
|
|
||||||
|
#include "pg/pg.h"
|
||||||
|
#include "pg/pg_ids.h"
|
||||||
|
|
||||||
|
#include "sdcard.h"
|
||||||
|
|
||||||
|
PG_REGISTER_WITH_RESET_TEMPLATE(sdcardConfig_t, sdcardConfig, PG_SDCARD_CONFIG, 0);
|
||||||
|
|
||||||
|
PG_RESET_TEMPLATE(sdcardConfig_t, sdcardConfig,
|
||||||
|
.useDma = false
|
||||||
|
);
|
||||||
|
#endif
|
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Cleanflight.
|
||||||
|
*
|
||||||
|
* Cleanflight is free software: you can redistribute it and/or modify
|
||||||
|
* it 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 is distributed in the hope that it 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "pg/pg.h"
|
||||||
|
|
||||||
|
typedef struct sdcardConfig_s {
|
||||||
|
uint8_t useDma;
|
||||||
|
} sdcardConfig_t;
|
||||||
|
|
||||||
|
PG_DECLARE(sdcardConfig_t, sdcardConfig);
|
|
@ -23,7 +23,7 @@
|
||||||
#ifdef USE_TARGET_CONFIG
|
#ifdef USE_TARGET_CONFIG
|
||||||
|
|
||||||
#include "telemetry/telemetry.h"
|
#include "telemetry/telemetry.h"
|
||||||
#include "fc/config.h"
|
#include "pg/sdcard.h"
|
||||||
|
|
||||||
void targetConfiguration(void)
|
void targetConfiguration(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
|
|
||||||
#include "common/axis.h"
|
#include "common/axis.h"
|
||||||
|
|
||||||
#include "fc/config.h"
|
|
||||||
|
|
||||||
#include "flight/mixer.h"
|
#include "flight/mixer.h"
|
||||||
#include "flight/pid.h"
|
#include "flight/pid.h"
|
||||||
|
|
||||||
|
#include "pg/sdcard.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined(SPRACINGF3MQ)
|
#if defined(SPRACINGF3MQ)
|
||||||
#ifdef BRUSHED_MOTORS_PWM_RATE
|
#ifdef BRUSHED_MOTORS_PWM_RATE
|
||||||
|
|
Loading…
Reference in New Issue