sensor: bmp388: Add I2C-base or SPI-base interface in build time
move DT_DRV_COMPAT to bmp388.h. so that can be decide which interface to use. define struct bmp388_bus_io interface bmp388_i2c.c and bmp388_spi.c. redefined bus operation interface in bmp388.c, this allow the driver to decide which interface to use during construction Signed-off-by: Weiwei Guo <guoweiwei@syriusrobotics.com>
This commit is contained in:
parent
9d7c51e3fb
commit
88f0793025
6 changed files with 230 additions and 221 deletions
|
@ -8,11 +8,7 @@
|
|||
* https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp388-ds001.pdf
|
||||
*/
|
||||
|
||||
#define DT_DRV_COMPAT bosch_bmp388
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/drivers/sensor.h>
|
||||
#include <zephyr/drivers/gpio.h>
|
||||
#include <zephyr/pm/device.h>
|
||||
#include <zephyr/logging/log.h>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue