Lines Matching +full:spi +full:- +full:addr
7 * SPDX-License-Identifier: Apache-2.0
11 * Bus-specific functionality for BME680s accessed via SPI.
23 return spi_is_ready_dt(&bus->spi) ? 0 : -ENODEV; in bme680_bus_check_spi()
26 static inline int bme680_set_mem_page(const struct device *dev, uint8_t addr) in bme680_set_mem_page() argument
28 const struct bme680_config *config = dev->config; in bme680_set_mem_page()
29 struct bme680_data *data = dev->data; in bme680_set_mem_page()
30 uint8_t page = (addr > 0x7f) ? 0U : 1U; in bme680_set_mem_page()
33 if (data->mem_page != page) { in bme680_set_mem_page()
55 err = spi_transceive_dt(&config->bus.spi, &tx, &rx); in bme680_set_mem_page()
60 if (data->mem_page == 1U) { in bme680_set_mem_page()
68 err = spi_write_dt(&config->bus.spi, &tx); in bme680_set_mem_page()
73 data->mem_page = page; in bme680_set_mem_page()
82 const struct bme680_config *config = dev->config; in bme680_reg_write_spi()
99 err = spi_write_dt(&config->bus.spi, &tx); in bme680_reg_write_spi()
107 const struct bme680_config *config = dev->config; in bme680_reg_read_spi()
109 uint8_t addr; in bme680_reg_read_spi() local
111 .buf = &addr, in bme680_reg_read_spi()
127 addr = start | BME680_SPI_READ_BIT; in bme680_reg_read_spi()
136 err = spi_transceive_dt(&config->bus.spi, &tx, &rx); in bme680_reg_read_spi()