Hi,
Please remap read/write function in API to your platform. From bmi160.c, you could get read() format in bmi160_get_regs().
Example in BMX160-magnetometer-problem :
bmi.read = spi_read_transfer;
bmi.write = spi_write_transfer;
int8_t spi_read_transfer(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len); int8_t spi_write_transfer(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len);
... View more