mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-11 01:32:48 +00:00
Adjust the documentation and devicetree overlays so the sample can be built for any board with an Arduino I2C and SPI pinout, defaulting I2C and SPI to y to make it easier to switch between the two without requiring a pristine build. The user has to choose an appropriate overlay or have a sensor built in to the board. Use the newly introduced DEVICE_DT_GET_ANY() in main.c to ask for a bosch,bme280 without worrying over the details or exposing DT_DRV_COMPAT-based functionality that is really meant for drivers. Remove the no-longer-needed board specific overlay for nRF52840 DK; this is covered by the generic Arduino overlays now. Fix the datasheet link while we're here. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
19 lines
405 B
Plaintext
19 lines
405 B
Plaintext
/*
|
|
* Copyright (c) 2020, Nordic Semiconductor ASA
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/* Example configuration of a BME280 device on an Arduino SPI bus. */
|
|
|
|
&arduino_spi {
|
|
status = "okay";
|
|
cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>;
|
|
bme280@0 {
|
|
compatible = "bosch,bme280";
|
|
reg = <0>;
|
|
label = "BME280_SPI";
|
|
spi-max-frequency = <1000000>; /* conservatively set to 1MHz */
|
|
};
|
|
};
|