mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Split initialization from gyro.c for flash savings
Move low performance requirements initialization code into gyro_init.c and optimize that for size.
This commit is contained in:
parent
d733c48b04
commit
ad0e7154a7
14 changed files with 859 additions and 775 deletions
36
src/main/sensors/gyro_init.h
Normal file
36
src/main/sensors/gyro_init.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* 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
|
||||
|
||||
#include "pg/gyrodev.h"
|
||||
#include "sensors/gyro.h"
|
||||
|
||||
void gyroSetTargetLooptime(uint8_t pidDenom);
|
||||
void gyroPreInit(void);
|
||||
bool gyroInit(void);
|
||||
void gyroInitFilters(void);
|
||||
void gyroInitSensor(gyroSensor_t *gyroSensor, const gyroDeviceConfig_t *config);
|
||||
gyroDetectionFlags_t getGyroDetectionFlags(void);
|
||||
const busDevice_t *gyroSensorBus(void);
|
||||
struct mpuDetectionResult_s;
|
||||
const struct mpuDetectionResult_s *gyroMpuDetectionResult(void);
|
||||
int16_t gyroRateDps(int axis);
|
||||
uint8_t gyroReadRegister(uint8_t whichSensor, uint8_t reg);
|
Loading…
Add table
Add a link
Reference in a new issue