flux sdk  v01.05.00-3-gedf3296
Embedded C++ SDK
Loading...
Searching...
No Matches
flxDevBMI270 Class Reference

#include <flxDevBMI270.h>

Inheritance diagram for flxDevBMI270:
flxDeviceI2CType< flxDevBMI270 > flxDevice flxOperation flxObject _flxParameterContainer flxPersist _flxPropertyContainer flxDescriptor

Public Member Functions

 flxDevBMI270 ()
 
bool onInitialize (TwoWire &)
 
bool execute (void)
 Called right before data parameters are read -. More...
 
- Public Member Functions inherited from flxDeviceI2CType< flxDevBMI270 >
virtual uint8_t getDefaultAddress (void)
 
bool initialize (TwoWire &wirePort)
 
bool initialize (flxBusI2C &i2cDriver)
 
bool initialize (void)
 
bool initialize (uint8_t address)
 
virtual bool onInitialize (TwoWire &)
 
flxTypeID getType (void)
 
bool isType (flxTypeID type)
 
flxDeviceKind_t getKind (void)
 
- Public Member Functions inherited from flxDevice
 flxDevice ()
 
virtual ~flxDevice ()
 
virtual bool execute (void)
 Virtual method called to run the operation - called before data is retrieved. More...
 
bool initialize ()
 
virtual bool initialize (flxBusI2C &)
 
virtual bool initialize (flxBusSPI &)
 
bool autoload (void)
 
void setAutoload ()
 
void setAddress (uint8_t address)
 
uint8_t address (void)
 
void addAddressToName ()
 
void setIsInitialized (bool isInit)
 
bool isInitialized (void)
 
virtual flxDeviceKind_t getKind (void)
 
- Public Member Functions inherited from flxOperation
virtual flxTypeID getType (void)
 
virtual bool execute (void)
 Virtual method called to run the operation - called before data is retrieved. More...
 
virtual bool onSave (flxStorageBlock *stBlk)
 
virtual bool onRestore (flxStorageBlock *stBlk)
 
- Public Member Functions inherited from flxObject
 flxObject ()
 
virtual ~flxObject ()
 
virtual size_t n_children (void)
 
void setParent (flxObject *parent)
 
void setParent (flxObject &parent)
 
flxObjectparent ()
 
void setHidden (bool bHide=true)
 
bool hidden ()
 
void setIsDirty (bool bDirty=true)
 
bool isDirty (void)
 
virtual bool onSave (flxStorageBlock *stBlk)
 
virtual bool save (flxStorage *pStorage)
 
virtual void restoreComplete (void)
 
virtual bool onRestore (flxStorageBlock *stBlk)
 
virtual bool restore (flxStorage *pStorage)
 
virtual flxTypeID getType (void)
 
virtual bool save (flxStorage *)=0
 
virtual bool restore (flxStorage *)=0
 
- Public Member Functions inherited from _flxPropertyContainer
 _flxPropertyContainer ()
 
void addProperty (flxProperty *newProperty)
 
void addProperty (flxProperty &newProperty)
 
void removeProperty (flxProperty *rmProp)
 
bool containsProperty (flxProperty *prop)
 
void removeProperty (flxProperty &rmProp)
 
flxPropertyListgetProperties (void)
 
uint nProperties (void)
 
bool saveProperties (flxStorageBlock *stBlk)
 
bool restoreProperties (flxStorageBlock *stBlk)
 
size_t propertySaveSize ()
 
void hideProperty (flxProperty &theProp)
 
- Public Member Functions inherited from flxDescriptor
 flxDescriptor ()
 
void setName (const char *new_name)
 Set the Name object - storing the pointer to the provided string No allocation is performed. If the previous name was allocated, it is freed. More...
 
void setName (const char *new_name, const char *new_desc)
 Set the Name object and the Description for the object. Both strings are constants. More...
 
void setName (char *new_name)
 Set the Name object, but makes a copy of the input string since the input is not const. If the previous name was allocated, it is freed. More...
 
const char * name ()
 Return a const char pointer to the name of the object. More...
 
std::string name_ (void)
 Returns a std::string of the name of the object. More...
 
void setDescription (const char *new_desc)
 Set the Description object - the input value is constant and not copied. If the previous description was allocated, it is freed. More...
 
void setDescription (char *new_desc)
 Set the Description object - the input value is not constant and is copied. If the previous description was allocated, it is freed. More...
 
const char * description ()
 Return the constant C string pointer to the description of the object. More...
 
std::string description_ (void)
 Return the description of the object as a std::string. More...
 
void setTitle (const char *title)
 Set the Title object - the title is optional and is used mostly for UX or organizational purposes. The input value is constant and not copied. If the previous title was allocated, it is freed. More...
 
void setTitleAlloc (char *new_title)
 Set the Title of the object , but make an explict copy of the provided string. More...
 
const char * title (void)
 Return the C constant string pointer to the title of the object. More...
 
- Public Member Functions inherited from _flxParameterContainer
void addParameter (flxParameterIn *newParam, bool head=false)
 
void addParameter (flxParameterIn &newParam, bool head=false)
 
void removeParameter (flxParameterIn *rmParam)
 
void removeParameter (flxParameterIn &rmParam)
 
size_t nInputParameters ()
 
void addParameter (flxParameterOut *newParam, bool head=false)
 
void addParameter (flxParameterOut &newParam, bool head=false)
 
void removeParameter (flxParameterOut *rmParam)
 
void removeParameter (flxParameterOut &rmParam)
 
size_t nOutputParameters ()
 
flxParameterOutListgetOutputParameters (void)
 
flxParameterInListgetInputParameters (void)
 

Static Public Member Functions

static bool isConnected (flxBusI2C &i2cDriver, uint8_t address)
 
static const char * getDeviceName ()
 
static const uint8_t * getDefaultAddresses ()
 
- Static Public Member Functions inherited from flxDeviceI2CType< flxDevBMI270 >
static flxTypeID type (void)
 
static flxDeviceKind_t kind (void)
 
- Static Public Member Functions inherited from flxObject
static flxTypeID type (void)
 

Public Attributes

flxPropertyRWUint8< flxDevBMI270, &flxDevBMI270::get_accel_odr, &flxDevBMI270::set_gyro_odr > accelDataRate
 
flxPropertyRWUint8< flxDevBMI270, &flxDevBMI270::get_accel_power_mode, &flxDevBMI270::set_accel_power_mode > accelPowerMode
 
flxPropertyRWUint8< flxDevBMI270, &flxDevBMI270::get_accel_filter_bandwidth, &flxDevBMI270::set_accel_filter_bandwidth > accelFilterBW
 
flxPropertyRWUint8< flxDevBMI270, &flxDevBMI270::get_accel_range, &flxDevBMI270::set_accel_range > accelRange
 
flxPropertyRWUint8< flxDevBMI270, &flxDevBMI270::get_gyro_odr, &flxDevBMI270::set_gyro_odr > gyroDataRate
 
flxPropertyRWUint8< flxDevBMI270, &flxDevBMI270::get_gyro_power_mode_filter, &flxDevBMI270::set_gyro_power_mode_filter > gyroFilterPowerMode
 
flxPropertyRWUint8< flxDevBMI270, &flxDevBMI270::get_gyro_power_mode_noise, &flxDevBMI270::set_gyro_power_mode_noise > gyroNoisePowerMode
 
flxPropertyRWUint8< flxDevBMI270, &flxDevBMI270::get_gyro_filter_bandwidth, &flxDevBMI270::set_gyro_filter_bandwidth > gyroFilterBW
 
flxPropertyRWUint8< flxDevBMI270, &flxDevBMI270::get_gyro_range, &flxDevBMI270::set_gyro_range > gyroRange
 
flxParameterOutFloat< flxDevBMI270, &flxDevBMI270::read_accel_x > accelX
 
flxParameterOutFloat< flxDevBMI270, &flxDevBMI270::read_accel_y > accelY
 
flxParameterOutFloat< flxDevBMI270, &flxDevBMI270::read_accel_z > accelZ
 
flxParameterOutFloat< flxDevBMI270, &flxDevBMI270::read_gyro_x > gyroX
 
flxParameterOutFloat< flxDevBMI270, &flxDevBMI270::read_gyro_y > gyroY
 
flxParameterOutFloat< flxDevBMI270, &flxDevBMI270::read_gyro_z > gyroZ
 
flxParameterOutFloat< flxDevBMI270, &flxDevBMI270::read_temperature > temperature
 
flxParameterOutUint< flxDevBMI270, &flxDevBMI270::read_step_count > stepCount
 
flxParameterInVoid< flxDevBMI270, &flxDevBMI270::write_reset_step_count > resetStepCount
 
- Public Attributes inherited from flxDevice
flxParameterInVoid< flxDevice, &flxDevice::disable_all_parameters > disableAllParameters
 
flxParameterInVoid< flxDevice, &flxDevice::enable_all_parameters > enableAllParameters
 

Static Public Attributes

static uint8_t defaultDeviceAddress []
 

Additional Inherited Members

- Protected Attributes inherited from flxDescriptor
const char * _name
 
bool _nameAlloc
 
const char * _desc
 
bool _descAlloc
 
const char * _title
 
bool _titleAlloc
 

Constructor & Destructor Documentation

◆ flxDevBMI270()

flxDevBMI270::flxDevBMI270 ( )

Member Function Documentation

◆ execute()

bool flxDevBMI270::execute ( void  )
virtual

Called right before data parameters are read -.

Reimplemented from flxDevice.

◆ getDefaultAddresses()

static const uint8_t * flxDevBMI270::getDefaultAddresses ( )
inlinestatic

◆ getDeviceName()

static const char * flxDevBMI270::getDeviceName ( )
inlinestatic

◆ isConnected()

bool flxDevBMI270::isConnected ( flxBusI2C i2cDriver,
uint8_t  address 
)
static

◆ onInitialize()

bool flxDevBMI270::onInitialize ( TwoWire &  wirePort)
virtual

Reimplemented from flxDeviceI2CType< flxDevBMI270 >.

Member Data Documentation

◆ accelDataRate

flxPropertyRWUint8<flxDevBMI270, &flxDevBMI270::get_accel_odr, &flxDevBMI270::set_gyro_odr> flxDevBMI270::accelDataRate
Initial value:
= {
BMI2_ACC_ODR_100HZ,
{{"0.78 Hz", BMI2_ACC_ODR_0_78HZ},
{"1.56 Hz", BMI2_ACC_ODR_1_56HZ},
{"3.12 Hz", BMI2_ACC_ODR_3_12HZ},
{"6.25 Hz", BMI2_ACC_ODR_6_25HZ},
{"12.5 Hz", BMI2_ACC_ODR_12_5HZ},
{"25 Hz", BMI2_ACC_ODR_25HZ},
{"50 Hz", BMI2_ACC_ODR_50HZ},
{"100 Hz", BMI2_ACC_ODR_100HZ},
{"200 Hz", BMI2_ACC_ODR_200HZ},
{"400 Hz", BMI2_ACC_ODR_400HZ},
{"800 Hz", BMI2_ACC_ODR_800HZ},
{"1600 Hz", BMI2_ACC_ODR_1600HZ}}}

◆ accelFilterBW

flxPropertyRWUint8<flxDevBMI270, &flxDevBMI270::get_accel_filter_bandwidth, &flxDevBMI270::set_accel_filter_bandwidth> flxDevBMI270::accelFilterBW
Initial value:
= {BMI2_ACC_NORMAL_AVG4,
{{"OSR4 or No Averaging", BMI2_ACC_OSR4_AVG1},
{"OSR2 or Average 2 Samples", BMI2_ACC_OSR2_AVG2},
{"Normal or Average 4 Samples", BMI2_ACC_NORMAL_AVG4},
{"CIC or Average 8 Samples", BMI2_ACC_CIC_AVG8},
{"Reserved or Average 16 Samples", BMI2_ACC_RES_AVG16},
{"Reserved or Average 32 Samples", BMI2_ACC_RES_AVG32},
{"Reserved or Average 64 Samples", BMI2_ACC_RES_AVG64},
{"Reserved or Average 128 Samples", BMI2_ACC_RES_AVG128}}}

◆ accelPowerMode

flxPropertyRWUint8<flxDevBMI270, &flxDevBMI270::get_accel_power_mode, &flxDevBMI270::set_accel_power_mode> flxDevBMI270::accelPowerMode
Initial value:
= {BMI2_PERF_OPT_MODE,
{{"Performance Mode", BMI2_PERF_OPT_MODE}, {"Power Saving Mode", BMI2_POWER_OPT_MODE}}}

◆ accelRange

flxPropertyRWUint8<flxDevBMI270, &flxDevBMI270::get_accel_range, &flxDevBMI270::set_accel_range> flxDevBMI270::accelRange
Initial value:
= {
BMI2_ACC_RANGE_8G,
{{"+/- 2 g", BMI2_ACC_RANGE_2G},
{"+/- 4 g", BMI2_ACC_RANGE_4G},
{"+/- 8 g", BMI2_ACC_RANGE_8G},
{"+/- 16 g", BMI2_ACC_RANGE_16G}}}

◆ accelX

flxParameterOutFloat<flxDevBMI270, &flxDevBMI270::read_accel_x> flxDevBMI270::accelX

◆ accelY

flxParameterOutFloat<flxDevBMI270, &flxDevBMI270::read_accel_y> flxDevBMI270::accelY

◆ accelZ

flxParameterOutFloat<flxDevBMI270, &flxDevBMI270::read_accel_z> flxDevBMI270::accelZ

◆ defaultDeviceAddress

uint8_t flxDevBMI270::defaultDeviceAddress
static
Initial value:
#define kSparkDeviceAddressNull
Definition: flxCoreDevice.h:36
#define kBMI270AddressDefault
Definition: flxDevBMI270.cpp:27
#define kBMI270AddressSecondary
Definition: flxDevBMI270.cpp:28

◆ gyroDataRate

flxPropertyRWUint8<flxDevBMI270, &flxDevBMI270::get_gyro_odr, &flxDevBMI270::set_gyro_odr> flxDevBMI270::gyroDataRate
Initial value:
= {
BMI2_GYR_ODR_200HZ,
{{"25 Hz", BMI2_GYR_ODR_25HZ},
{"50 Hz", BMI2_GYR_ODR_50HZ},
{"100 Hz", BMI2_GYR_ODR_100HZ},
{"200 Hz", BMI2_GYR_ODR_200HZ},
{"400 Hz", BMI2_GYR_ODR_400HZ},
{"800 Hz", BMI2_GYR_ODR_800HZ},
{"1600 Hz", BMI2_GYR_ODR_1600HZ},
{"3200 Hz", BMI2_GYR_ODR_3200HZ}}}

◆ gyroFilterBW

flxPropertyRWUint8<flxDevBMI270, &flxDevBMI270::get_gyro_filter_bandwidth, &flxDevBMI270::set_gyro_filter_bandwidth> flxDevBMI270::gyroFilterBW
Initial value:
= {BMI2_GYR_NORMAL_MODE,
{{"OSR4", BMI2_GYR_OSR4_MODE},
{"OSR2", BMI2_GYR_OSR2_MODE},
{"Normal", BMI2_GYR_NORMAL_MODE},
{"CIC", BMI2_GYR_CIC_MODE}}}

◆ gyroFilterPowerMode

flxPropertyRWUint8<flxDevBMI270, &flxDevBMI270::get_gyro_power_mode_filter, &flxDevBMI270::set_gyro_power_mode_filter> flxDevBMI270::gyroFilterPowerMode
Initial value:
= {BMI2_PERF_OPT_MODE,
{{"Performance Mode", BMI2_PERF_OPT_MODE}, {"Power Saving Mode", BMI2_POWER_OPT_MODE}}}

◆ gyroNoisePowerMode

flxPropertyRWUint8<flxDevBMI270, &flxDevBMI270::get_gyro_power_mode_noise, &flxDevBMI270::set_gyro_power_mode_noise> flxDevBMI270::gyroNoisePowerMode
Initial value:
= {BMI2_PERF_OPT_MODE,
{{"Performance Mode", BMI2_PERF_OPT_MODE}, {"Power Saving Mode", BMI2_POWER_OPT_MODE}}}

◆ gyroRange

flxPropertyRWUint8<flxDevBMI270, &flxDevBMI270::get_gyro_range, &flxDevBMI270::set_gyro_range> flxDevBMI270::gyroRange
Initial value:
= {
BMI2_GYR_RANGE_2000,
{{"+/- 2000 deg/s", BMI2_GYR_RANGE_2000},
{"+/- 1000 deg/s", BMI2_GYR_RANGE_1000},
{"+/- 500 deg/s", BMI2_GYR_RANGE_500},
{"+/- 250 deg/s", BMI2_GYR_RANGE_250},
{"+/- 125 deg/s", BMI2_GYR_RANGE_125}}}

◆ gyroX

flxParameterOutFloat<flxDevBMI270, &flxDevBMI270::read_gyro_x> flxDevBMI270::gyroX

◆ gyroY

flxParameterOutFloat<flxDevBMI270, &flxDevBMI270::read_gyro_y> flxDevBMI270::gyroY

◆ gyroZ

flxParameterOutFloat<flxDevBMI270, &flxDevBMI270::read_gyro_z> flxDevBMI270::gyroZ

◆ resetStepCount

flxParameterInVoid<flxDevBMI270, &flxDevBMI270::write_reset_step_count> flxDevBMI270::resetStepCount

◆ stepCount

flxParameterOutUint<flxDevBMI270, &flxDevBMI270::read_step_count> flxDevBMI270::stepCount

◆ temperature

flxParameterOutFloat<flxDevBMI270, &flxDevBMI270::read_temperature> flxDevBMI270::temperature

The documentation for this class was generated from the following files: