Skip to content

Commit

Permalink
Fixups to use bmi088
Browse files Browse the repository at this point in the history
  • Loading branch information
davids5 committed Jul 31, 2019
1 parent 6f8593e commit 1b9a40f
Show file tree
Hide file tree
Showing 8 changed files with 1,236 additions and 1,219 deletions.
2 changes: 1 addition & 1 deletion boards/px4/fmu-v5x/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ px4_add_board(
imu/adis16448
imu/adis16497
#imu # all available imu drivers
# TBD imu/bmi088 - needs bus selection
imu/bmi088
# TBD imu/ism330dlc - needs bus selection
imu/mpu6000
irlock
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/drv_sensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
#define DRV_GYR_DEVTYPE_ADIS16497 0x64
#define DRV_BARO_DEVTYPE_BAROSIM 0x65
#define DRV_BARO_DEVTYPE_BMP388 0x66
#define DRV_ACC_DEVTYPE_BMI088 0x66
#define DRV_GYR_DEVTYPE_BMI088 0x67
#define DRV_ACC_DEVTYPE_BMI088 0x67
#define DRV_GYR_DEVTYPE_BMI088 0x68

/*
* ioctl() definitions
Expand Down
52 changes: 26 additions & 26 deletions src/drivers/imu/bmi088/BMI088.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,42 +55,42 @@ class BMI088 : public device::SPI

protected:

uint8_t _whoami; /** whoami result */
uint8_t _whoami; /** whoami result */

uint8_t _register_wait;
uint64_t _reset_wait;
uint8_t _register_wait;
uint64_t _reset_wait;

enum Rotation _rotation;
enum Rotation _rotation;

uint8_t _checked_next;
uint8_t _checked_next;

/**
* Read a register from the BMI088
*
* @param The register to read.
* @return The value that was read.
*/
virtual uint8_t read_reg(unsigned reg); // This needs to be declared as virtual, because the
virtual uint16_t read_reg16(unsigned reg);
/**
* Read a register from the BMI088
*
* @param The register to read.
* @return The value that was read.
*/
virtual uint8_t read_reg(unsigned reg); // This needs to be declared as virtual, because the
virtual uint16_t read_reg16(unsigned reg);

/**
* Write a register in the BMI088
*
* @param reg The register to write.
* @param value The new value to write.
*/
void write_reg(unsigned reg, uint8_t value);
/**
* Write a register in the BMI088
*
* @param reg The register to write.
* @param value The new value to write.
*/
void write_reg(unsigned reg, uint8_t value);

/* do not allow to copy this class due to pointer data members */
BMI088(const BMI088 &);
BMI088 operator=(const BMI088 &);
/* do not allow to copy this class due to pointer data members */
BMI088(const BMI088 &);
BMI088 operator=(const BMI088 &);

public:

BMI088(const char *name, const char *devname, int bus, uint32_t device, enum spi_mode_e mode, uint32_t frequency,
enum Rotation rotation);
BMI088(const char *name, const char *devname, int bus, uint32_t device, enum spi_mode_e mode, uint32_t frequency,
enum Rotation rotation);

virtual ~BMI088() = default;
virtual ~BMI088() = default;


};
Loading

0 comments on commit 1b9a40f

Please sign in to comment.