Hello yosibuc,
How do you assign values to this structure "struct bmi2_dev"?
The following is a reference code.
struct bmi2_dev bmi270dev;
main(void)
{
struct bmi2_dev *dev; dev = &bmi270dev;
Init_BMI270(dev);
}
int8_t Init_BMI270(struct bmi2_dev *dev) { int8_t rslt = BMI2_OK;
dev->dev_id = 0x00, dev->intf = BMI2_SPI_INTERFACE, dev->read = (bmi2_read_fptr_t)SensorAPI_SPIx_Read, dev->write = (bmi2_write_fptr_t)SensorAPI_SPIx_Write, dev->delay_us = (bmi2_delay_fptr_t)DelayUs, dev->read_write_len = 32, dev->config_file_ptr = NULL;
rslt = bmi270_wh_init(dev);
if (rslt != BMI2_OK) { PDEBUG("bmi270_wh_init() failed, error code: %d\r\n", rslt); return rslt; }
...
}
... View more