Skip to content

Commit

Permalink
♻️ (imu): Move lsm6dsox dataready pulsed config in init
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli committed Feb 19, 2024
1 parent e976dc2 commit efca9fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/CoreIMU/source/CoreIMU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ void CoreIMU::init()

lsm6dsox_mode_set(&_register_io_function, nullptr, &_config);

lsm6dsox_dataready_pulsed_t data_ready_pulsed {LSM6DSOX_DRDY_PULSED};
lsm6dsox_data_ready_mode_set(&_register_io_function, data_ready_pulsed);

setDataAvailableInterrupt();
}

Expand Down Expand Up @@ -135,9 +138,6 @@ auto CoreIMU::ptr_io_read(CoreIMU *handle, uint8_t read_address, uint8_t *p_buff

void CoreIMU::setDataAvailableInterrupt()
{
lsm6dsox_dataready_pulsed_t data_ready_pulsed {LSM6DSOX_DRDY_PULSED};
lsm6dsox_data_ready_mode_set(&_register_io_function, data_ready_pulsed);

lsm6dsox_pin_int1_route_t lsm6dsox_int1 {
.drdy_xl = PROPERTY_ENABLE,
.den_flag = PROPERTY_ENABLE,
Expand Down

0 comments on commit efca9fb

Please sign in to comment.