doc: reference: drivers: update system drivers section
Update the system drivers section: remove references to SYS_DEVICE_DEFINE, add references to the SYS_INIT() macro. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
e8bcaff0ee
commit
770732fe92
1 changed files with 4 additions and 15 deletions
|
@ -382,21 +382,10 @@ function.
|
|||
System Drivers
|
||||
**************
|
||||
|
||||
In some cases you may just need to run a function at boot. Special ``SYS_*``
|
||||
macros exist that map to ``DEVICE_DEFINE()`` calls.
|
||||
For ``SYS_INIT()`` there are no config or runtime data structures and there
|
||||
isn't a way
|
||||
to later get a device pointer by name. The same policies for initialization
|
||||
level and priority apply.
|
||||
|
||||
For ``SYS_DEVICE_DEFINE()`` you can obtain pointers by name.
|
||||
|
||||
:c:func:`SYS_INIT()`
|
||||
Run an initialization function at boot at specified priority.
|
||||
|
||||
:c:func:`SYS_DEVICE_DEFINE()`
|
||||
Like :c:func:`DEVICE_DEFINE` without an API table and constructing
|
||||
the device name from the init function name.
|
||||
In some cases you may just need to run a function at boot. For such cases, the
|
||||
:c:macro:`SYS_INIT` can be used. This macro does not take any config or runtime
|
||||
data structures and there isn't a way to later get a device pointer by name. The
|
||||
same device policies for initialization level and priority apply.
|
||||
|
||||
Error handling
|
||||
**************
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue