|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
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()
286 #endif // RADIO_CONTROL_CC2500_COMPAT_H
float pt1FilterApply(pt1Filter_t *filter, float input)
float pt1FilterGain(float f_cut, float dT)
void(* gpiofnptr_t)(uint32_t port, uint16_t pin)
struct pt1Filter_s pt1Filter_t
void bf_delay(timeMs_t ms)
void bf_IOInit(IO_t io, uint8_t owner, uint8_t index)
bool bf_IORead(IO_t gpio)
int16_t bf_getEstimatedVario(void)
void bf_delayMicroseconds(timeUs_t us)
int32_t bf_getEstimatedAltitudeCm(void)
bool bf_rxSpiDeviceInit(void)
bool bf_featureIsEnabled(const uint32_t mask)
void pt1FilterInit(pt1Filter_t *filter, float k)
static timeDelta_t cmpTimeUs(timeUs_t a, timeUs_t b)
controlRateConfig_t * currentControlRateProfile
void bf_IOConfigGPIO(IO_t io, enum ioconfig_t cfg)
struct attitude_values_t values
bool bf_isAmperageConfigured(void)
struct pidProfile_s * currentPidProfile
IO_t bf_IOGetByTag(ioTag_t io)
uint16_t bf_getLegacyBatteryVoltage(void)
int32_t bf_getMAhDrawn(void)
uint8_t bf_getBatteryCellCount(void)
void pt1FilterUpdateCutoff(pt1Filter_t *filter, float k)
uint16_t bf_adcGetChannel(uint8_t channel)
void bf_IOToggle(IO_t io)
struct attitude_t bf_attitude
uint16_t bf_getBatteryVoltage(void)
bool bf_isBatteryVoltageConfigured(void)
int32_t bf_getAmperage(void)
@ FEATURE_RX_PARALLEL_PWM