49 return features & mask;
54 #define M_PI_FLOAT 3.14159265358979323846f
58 return dT / (RC + dT);
132 assert(
"Invalid IO config" == NULL);
arch independent ADC (Analog to Digital Converter) API
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 pidProfile_s * currentPidProfile
struct attitude_t bf_attitude
int32_t bf_getAmperage(void)
uint16_t bf_adcGetChannel(uint8_t channel)
int32_t bf_getMAhDrawn(void)
uint8_t bf_getBatteryCellCount(void)
IO_t bf_IOGetByTag(ioTag_t io)
float pt1FilterGain(float f_cut, float dT)
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
void gpio_setup_input_pullup(ioportid_t port, uint16_t gpios)
Setup one or more pins of the given GPIO port as inputs with pull up resistor enabled.
void gpio_setup_output(ioportid_t port, uint16_t gpios)
Setup one or more pins of the given GPIO port as outputs.
void gpio_setup_input(ioportid_t port, uint16_t gpios)
Setup one or more pins of the given GPIO port as inputs.
static void gpio_toggle(ioportid_t port, uint16_t pin)
Toggle a gpio output to low level.
static uint8_t gpio_get(ioportid_t port, uint16_t pin)
Get level of a gpio.
void sys_time_usleep(uint32_t us)
sys_time_usleep(uint32_t us)
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
uint32_t get_sys_time_msec(void)
Get the time in milliseconds since startup.
struct Electrical electrical
Interface for electrical status: supply voltage, current, battery status, etc.
float current
current in A
float charge
consumed electric charge in Ah
float vsupply
supply voltage in V
Some architecture independent helper functions for GPIOs.
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static struct EnuCoor_f * stateGetSpeedEnu_f(void)
Get ground speed in local ENU coordinates (float).
API to get/set the generic vehicle states.
Architecture independent timing functions.
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.