samples: driver: i2c_scanner: use arduino-defined device if available

nucleo_l476rg uses I2C_3 rather than I2C_0, and uses special magic to
synthesize a corresponding define from a device tree node label.  Update
the sample to use the Arduino binding if that's present.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
Peter A. Bigot 2018-12-29 09:27:50 -06:00 committed by Carles Cufí
parent 2705901460
commit 173d07c6e5

View file

@ -10,7 +10,11 @@
#include <device.h>
#include <i2c.h>
#ifdef ARDUINO_I2C_LABEL
#define I2C_DEV ARDUINO_I2C_LABEL
#else
#define I2C_DEV "I2C_0"
#endif
/**
* @file This app scans I2C bus for any devices present