35 #ifndef RADIO_CONTROL_CC2500_COMPAT_H
36 #define RADIO_CONTROL_CC2500_COMPAT_H
39 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
40 #pragma GCC diagnostic ignored "-Wstrict-prototypes"
41 #pragma GCC diagnostic ignored "-Wswitch-default"
42 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
43 #pragma GCC diagnostic ignored "-Wshadow"
51 #define USE_RX_FRSKY_SPI
52 #define USE_RX_FRSKY_SPI_TELEMETRY
54 #if (CC2500_RX_SPI_PROTOCOL == RX_SPI_FRSKY_X_LBT) || (CC2500_RX_SPI_PROTOCOL == RX_SPI_FRSKY_X)
55 #define USE_RX_FRSKY_SPI_X
56 #define USE_TELEMETRY_SMARTPORT
58 #if (CC2500_RX_SPI_PROTOCOL == RX_SPI_FRSKY_D)
59 #define USE_RX_FRSKY_SPI_D
62 #define DEBUG_SET(...)
63 #define STATIC_ASSERT(...)
64 #define STATIC_UNIT_TESTED static
68 #define sensors(...) 1
79 #define attitude bf_attitude
84 #define FALLTHROUGH __attribute__ ((fallthrough))
86 #define FALLTHROUGH do {} while(0)
94 #define TIMEUS_MAX UINT32_MAX
101 __extension__ ({ __typeof__ (a) _a = (a); \
102 __typeof__ (b) _b = (b); \
103 _a < _b ? _a : _b; })
163 #define featureIsEnabled(mask) bf_featureIsEnabled(mask)
168 #define delayMicroseconds(us) bf_delayMicroseconds(us)
171 #define delay(ms) bf_delay(ms)
174 #define micros() bf_micros()
176 #define millis() bf_millis()
180 #define ADC_EXTERNAL1 1
182 #define adcGetChannel(channel) bf_adcGetChannel(channel)
186 #define RX_SPI_MAX_PAYLOAD_SIZE 35
189 #define rxSpiDeviceInit(rxSpiConfig) bf_rxSpiDeviceInit()
193 #define PPM_RCVR_TIMEOUT 0
210 #define IOGetByTag(io) bf_IOGetByTag(io)
213 #define IOInit(io, owner, index) bf_IOInit(io, owner, index)
221 #define IOConfigGPIO(io, cfg) bf_IOConfigGPIO(io, cfg)
224 #define IORead(gpio) bf_IORead(gpio)
227 #define IOHi(io) bf_IOHi(io)
229 #define IOLo(io) bf_IOLo(io)
231 #define IOToggle(io) bf_IOToggle(io)
235 #define isArmingDisabled() 0
236 #define ARMING_FLAG(...) 1
237 #define FLIGHT_MODE(...) 0
252 #define getEstimatedAltitudeCm() bf_getEstimatedAltitudeCm()
255 #define getEstimatedVario() bf_getEstimatedVario()
268 #define isBatteryVoltageConfigured() bf_isBatteryVoltageConfigured()
271 #define getLegacyBatteryVoltage() bf_getLegacyBatteryVoltage()
273 #define getBatteryVoltage() bf_getBatteryVoltage()
276 #define getBatteryCellCount() bf_getBatteryCellCount()
279 #define isAmperageConfigured() bf_isAmperageConfigured()
281 #define getAmperage() bf_getAmperage()
283 #define getMAhDrawn() bf_getMAhDrawn()
struct pt1Filter_s pt1Filter_t
void pt1FilterInit(pt1Filter_t *filter, float k)
bool bf_isAmperageConfigured(void)
bool bf_isBatteryVoltageConfigured(void)
void bf_delayMicroseconds(timeUs_t us)
int32_t bf_getEstimatedAltitudeCm(void)
uint16_t bf_getBatteryVoltage(void)
bool bf_rxSpiDeviceInit(void)
struct attitude_values_t values
struct pidProfile_s * currentPidProfile
void(* gpiofnptr_t)(uint32_t port, uint16_t pin)
struct attitude_t bf_attitude
int32_t bf_getAmperage(void)
uint16_t bf_adcGetChannel(uint8_t channel)
int32_t bf_getMAhDrawn(void)
static timeDelta_t cmpTimeUs(timeUs_t a, timeUs_t b)
uint8_t bf_getBatteryCellCount(void)
IO_t bf_IOGetByTag(ioTag_t io)
float pt1FilterGain(float f_cut, float dT)
@ FEATURE_RX_PARALLEL_PWM
bool bf_IORead(IO_t gpio)
int16_t bf_getEstimatedVario(void)
void bf_IOInit(IO_t io, uint8_t owner, uint8_t index)
void bf_delay(timeMs_t ms)
void pt1FilterUpdateCutoff(pt1Filter_t *filter, float k)
void bf_IOToggle(IO_t io)
uint16_t bf_getLegacyBatteryVoltage(void)
float pt1FilterApply(pt1Filter_t *filter, float input)
void bf_IOConfigGPIO(IO_t io, enum ioconfig_t cfg)
bool bf_featureIsEnabled(const uint32_t mask)
controlRateConfig_t * currentControlRateProfile
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
signed char int8_t
Typedef defining 8 bit char type.