Replies: 2 comments 16 replies
-
It looks like the device is declared static so it cannot be accessed from other file like that. |
Beta Was this translation helpful? Give feedback.
13 replies
-
For the reasoning of the removal of the APPLICATION level, see the commit beec8b0 that deprecated it. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
DEVICE_DEFINE()
macro to define a device outside of Device Tree. However, when I define it in one file like this:and then try to access it in another file using:
dev = DEVICE_GET(device_0);
I get the following error:
zephyr/include/zephyr/device.h:96:41: error: '__device_device_0' undeclared here
How can I resolve this issue?
APPLICATION
initialization level no longer be used for devices? I found it very useful because I want to initialize a device only after a module, which I initialize usingSYS_INIT
inAPPLICATION
level. I can achieve this by setting the device's initialization priority higher than the priority inSYS_INIT
.EDIT:
I noticed that the APPLICATION initialization level was removed in this PR by @gmarull: Remove a few deprecated items. Could you explain the reasoning behind this change? Also, what alternatives are available for developers who need to initialize non-DTS devices at the APPLICATION level? I'm asking because I want to set a device API (specifically sensor_api), which doesn't seem achievable with SYS_INIT.
Best Regards
Beta Was this translation helpful? Give feedback.
All reactions