#ifndef _IMU_QMI8658_H_
#define _IMU_QMI8658_H_

#include "esp_err.h"
#include "driver/i2c_master.h"
#include "qmi8658.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
    float accelX;
    float accelY;
    float accelZ;
    float gyroX;
    float gyroY;
    float gyroZ;
} imu_qmi8658_data_t;

/**
 * @brief Initialize QMI8658 IMU
 */
esp_err_t imu_qmi8658_init(i2c_master_bus_handle_t i2c_bus);

/**
 * @brief Read data from QMI8658 IMU
 */
esp_err_t imu_qmi8658_read(imu_qmi8658_data_t *out_data);

/**
 * @brief Get the internal IMU device handle
 */
qmi8658_dev_t* imu_qmi8658_get_dev(void);

#ifdef __cplusplus
}
#endif

#endif // _IMU_QMI8658_H_
