Skip to content
Commit 2aab6872 authored by Peter Bigot's avatar Peter Bigot Committed by Kumar Gala
Browse files

device: introduce device_usable_check



As we add support for devices that are powered down, or are present
but have not yet been started, we need more precise information about
why a device isn't ready, so callers can take appropriate steps to
make it ready.

Add a new function that determines readiness and indicates the reason
for not being ready in a defined unique error code per condition.
Expose this in both a syscall form to be invoked from applications,
and a unchecked form that can be used from supervisor contexts
including syscall implementation functions.

Anticipated future conditions include:
* device is powered down and needs to be brought back up;
* device was installed disabled and has not been started.

Signed-off-by: default avatarPeter Bigot <peter.bigot@nordicsemi.no>
parent c9bfb251
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment