03-11-2021 03:47 PM
03-11-2021 11:22 PM
Hello Dee,
Please use as below.
#if BMP3_INTERFACE_I2C==1
/* I2C setup */
/* link read/write/delay function of host system to appropriate
* bmp3 function call prototypes */
i2c_bus = BMP3_DEV_ADDR;
bmp3Dev.intf_ptr = &i2c_bus;
bmp3Dev.intf = BMP3_I2C_INTF;
bmp3Dev.read = bmp3_hal_i2c_bus_read;
bmp3Dev.write = bmp3_hal_i2c_bus_write;
bmp3Dev.delay_us = bmp3_hal_delay_usec;
#elif BMP3_INTERFACE_SPI==1
/* SPI setup */
/* link read/write/delay function of host system to appropriate
* bmp3 function call prototypes */
spi_bus = COINES_SHUTTLE_PIN_7; // put your SPI CS pin number
bmp3Dev.intf_ptr = &spi_bus;
bmp3Dev.intf = BMP3_SPI_INTF;
bmp3Dev.read = bmp3_hal_spi_bus_read;
bmp3Dev.write = bmp3_hal_spi_bus_write;
bmp3Dev.delay_us = bmp3_hal_delay_usec;
#endif
Thanks,