samples: i2c: fram: use node label instead of alias

Add more coverage by not using aliases and directly use node label.

Fixes #38154

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2021-09-07 09:56:39 -04:00
parent a50a16e710
commit aebb4b5ed6
2 changed files with 3 additions and 5 deletions

View file

@ -4,7 +4,7 @@ tests:
sample.drivers.i2c.fujitsu_fram:
tags: drivers
depends_on: i2c
filter: dt_alias_exists("i2c-0")
filter: dt_nodelabel_enabled("i2c0")
harness: console
harness_config:
type: one_line

View file

@ -10,10 +10,8 @@
#include <device.h>
#include <drivers/i2c.h>
#define I2C_NODE DT_ALIAS(i2c_0)
/**
* @file Sample app using the Fujitsu MB85RC256V FRAM through ARC I2C.
* @file Sample app using the Fujitsu MB85RC256V FRAM through I2C.
*/
#define FRAM_I2C_ADDR 0x50
@ -72,7 +70,7 @@ static int read_bytes(const struct device *i2c_dev, uint16_t addr,
void main(void)
{
const struct device *i2c_dev = DEVICE_DT_GET(I2C_NODE);
const struct device *i2c_dev = DEVICE_DT_GET(DT_NODELABEL(i2c0));
uint8_t cmp_data[16];
uint8_t data[16];
int i, ret;