40 #define BMI088_DEVICE_PATH_GYRO     "/dev/bmi088_gyro"    41 #define BMI088_DEVICE_PATH_GYRO_EXT "/dev/bmi088_gyro_ext"    44 #define BMI088_GYR_CHIP_ID          0x00    45 #define BMI088_GYR_X_L              0x02    46 #define BMI088_GYR_X_H              0x03    47 #define BMI088_GYR_Y_L              0x04    48 #define BMI088_GYR_Y_H              0x05    49 #define BMI088_GYR_Z_L              0x06    50 #define BMI088_GYR_Z_H              0x07    51 #define BMI088_GYR_INT_STATUS_0     0x09    52 #define BMI088_GYR_INT_STATUS_1     0x0A    53 #define BMI088_GYR_INT_STATUS_2     0x0B    54 #define BMI088_GYR_INT_STATUS_3     0x0C    55 #define BMI088_GYR_FIFO_STATUS      0x0E    56 #define BMI088_GYR_RANGE            0x0F    57 #define BMI088_GYR_BW               0x10    58 #define BMI088_GYR_LPM1             0x11    59 #define BMI088_GYR_LPM2             0x12    60 #define BMI088_GYR_RATE_HBW         0x13    61 #define BMI088_GYR_SOFTRESET        0x14    62 #define BMI088_GYR_INT_EN_0         0x15    63 #define BMI088_GYR_INT_EN_1         0x16    64 #define BMI088_GYR_INT_MAP_0        0x17    65 #define BMI088_GYR_INT_MAP_1        0x18    66 #define BMI088_GYR_INT_MAP_2        0x19    67 #define BMI088_GYRO_0_REG           0x1A    68 #define BMI088_GYRO_1_REG           0x1B    69 #define BMI088_GYRO_2_REG           0x1C    70 #define BMI088_GYRO_3_REG           0x1E    71 #define BMI088_GYR_INT_LATCH        0x21    72 #define BMI088_GYR_INT_LH_0         0x22    73 #define BMI088_GYR_INT_LH_1         0x23    74 #define BMI088_GYR_INT_LH_2         0x24    75 #define BMI088_GYR_INT_LH_3         0x25    76 #define BMI088_GYR_INT_LH_4         0x26    77 #define BMI088_GYR_INT_LH_5         0x27    78 #define BMI088_GYR_SOC              0x31    79 #define BMI088_GYR_A_FOC            0x32    80 #define BMI088_GYR_TRIM_NVM_CTRL    0x33    81 #define BMI088_BGW_SPI3_WDT         0x34    82 #define BMI088_GYR_OFFSET_COMP      0x36    83 #define BMI088_GYR_OFFSET_COMP_X    0x37    84 #define BMI088_GYR_OFFSET_COMP_Y    0x38    85 #define BMI088_GYR_OFFSET_COMP_Z    0x39    86 #define BMI088_GYR_TRIM_GPO         0x3A    87 #define BMI088_GYR_TRIM_GP1         0x3B    88 #define BMI088_GYR_SELF_TEST        0x3C    89 #define BMI088_GYR_FIFO_CONFIG_0    0x3D    90 #define BMI088_GYR_FIFO_CONFIG_1    0x3E    91 #define BMI088_GYR_FIFO_DATA        0x3F    94 #define BMI088_GYR_WHO_AM_I         0x0F    97 #define BMI088_GYRO_RATE_100        (0<<3) | (1<<2) | (1<<1) | (1<<0)    98 #define BMI088_GYRO_RATE_200        (0<<3) | (1<<2) | (1<<1) | (0<<0)    99 #define BMI088_GYRO_RATE_400        (0<<3) | (0<<2) | (1<<1) | (1<<0)   100 #define BMI088_GYRO_RATE_1000       (0<<3) | (0<<2) | (1<<1) | (0<<0)   101 #define BMI088_GYRO_RATE_2000       (0<<3) | (0<<2) | (0<<1) | (1<<0)   104 #define BMI088_GYRO_NORMAL          (0<<7) | (0<<5)   105 #define BMI088_GYRO_DEEP_SUSPEND    (0<<7) | (1<<5)   106 #define BMI088_GYRO_SUSPEND         (1<<7) | (0<<5)   109 #define BMI088_GYRO_RANGE_2000_DPS  (0<<2) | (0<<1) | (0<<0)   110 #define BMI088_GYRO_RANGE_1000_DPS  (0<<2) | (0<<1) | (1<<0)   111 #define BMI088_GYRO_RANGE_500_DPS   (0<<2) | (1<<1) | (0<<0)   112 #define BMI088_GYRO_RANGE_250_DPS   (0<<2) | (1<<1) | (1<<0)   113 #define BMI088_GYRO_RANGE_125_DPS   (1<<2) | (0<<1) | (0<<0)   116 #define BMI088_GYR_DRDY_INT_EN      (1<<7)   119 #define BMI088_GYR_DRDY_INT1        (1<<0)   122 #define BMI088_GYRO_DEFAULT_RANGE_DPS       2000   123 #define BMI088_GYRO_DEFAULT_RATE            1000   124 #define BMI088_GYRO_MAX_RATE                1000   125 #define BMI088_GYRO_MAX_PUBLISH_RATE        280   127 #define BMI088_GYRO_DEFAULT_DRIVER_FILTER_FREQ  50   130 #define BMI088_GYRO_BW_MASK                  0x0F   168 #define BMI088_GYRO_NUM_CHECKED_REGISTERS 7   215     void            modify_reg(
unsigned reg, uint8_t clearbits, uint8_t setbits);
   247 #pragma pack(push, 1) uint8_t _checked_values[BMI088_GYRO_NUM_CHECKED_REGISTERS]
 
perf_counter_t _sample_perf
 
void stop()
Stop automatic measurement. 
 
BMI088_gyro operator=(const BMI088_gyro &)
 
void modify_reg(unsigned reg, uint8_t clearbits, uint8_t setbits)
Modify a register in the BMI088_gyro. 
 
uint8_t _checked_bad[BMI088_GYRO_NUM_CHECKED_REGISTERS]
 
void check_registers(void)
 
static const uint8_t _checked_registers[BMI088_GYRO_NUM_CHECKED_REGISTERS]
 
Namespace encapsulating all device framework classes, functions and data. 
 
#define BMI088_GYRO_NUM_CHECKED_REGISTERS
 
perf_counter_t _bad_transfers
 
void measure()
Fetch measurements from the sensor and update the report buffers. 
 
static void measure_trampoline(void *arg)
Static trampoline from the hrt_call context; because we don't have a generic hrt wrapper yet...
 
Rotation
Enum for board and external compass rotations. 
 
void print_info()
Diagnostics - print some basic information about the driver. 
 
perf_counter_t _bad_registers
 
Report conversation within the BMI088_gyro, including command byte and interrupt status. 
 
void write_checked_reg(unsigned reg, uint8_t value)
Write a register in the BMI088_gyro, updating _checked_values. 
 
int gyro_set_sample_rate(float desired_sample_rate_hz)
 
int set_gyro_range(unsigned max_dps)
Set the BMI088_gyro measurement range. 
 
BMI088_gyro(int bus, const char *path_gyro, uint32_t device, enum Rotation rotation)