We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51e774a commit 09ad926Copy full SHA for 09ad926
samples/shields/lmp90100_evb/rtd/src/main.c
@@ -60,7 +60,7 @@ static double rtd_temperature(int nom, double resistance)
60
61
void main(void)
62
{
63
- const struct device *lmp90100;
+ const struct device *lmp90100 = DEVICE_DT_GET_ONE(ti_lmp90100);
64
double resistance;
65
int32_t buffer;
66
int err;
@@ -83,9 +83,8 @@ void main(void)
83
.calibrate = 0
84
};
85
86
- lmp90100 = device_get_binding(DT_LABEL(DT_INST(0, ti_lmp90100)));
87
- if (!lmp90100) {
88
- LOG_ERR("LMP90100 device not found");
+ if (!device_is_ready(lmp90100)) {
+ LOG_ERR("LMP90100 device not ready");
89
return;
90
}
91
0 commit comments