Re: Determining type of device

Boie, Andrew P

Hello everyone,

is there a zephyr-way in determining which type a device is, after getting a
reference to it through device_get_binding?

Since a gpio device has the same signature as a flash for example it's not
obvious for me how to make sure that the right device pointer is passed in a
higer-level application.
If you run your threads in user mode, you will get a fatal error if a thread tries to make a driver API system call with the wrong type of driver object.

There is no checking done for threads running in supervisor mode.


Join to automatically receive all group messages.