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:
Gerard Marull-Paretas 2021-12-22 12:08:45 +01:00 committed by Christopher Friedt
commit 770732fe92

View file

@ -382,21 +382,10 @@ function.
System Drivers System Drivers
************** **************
In some cases you may just need to run a function at boot. Special ``SYS_*`` In some cases you may just need to run a function at boot. For such cases, the
macros exist that map to ``DEVICE_DEFINE()`` calls. :c:macro:`SYS_INIT` can be used. This macro does not take any config or runtime
For ``SYS_INIT()`` there are no config or runtime data structures and there data structures and there isn't a way to later get a device pointer by name. The
isn't a way same device policies for initialization level and priority apply.
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.
Error handling Error handling
************** **************