docs: drivers: remove suggestion to assign driver_api in init function
The driver API should be assigned at the time the device is defined. Assigning in the init function is redundant and prevents moving the pointer to a immutable driver structure. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
78f14aa91d
commit
ccc53f9872
1 changed files with 1 additions and 2 deletions
|
@ -173,8 +173,7 @@ of these APIs, and populate an instance of subsystem_api structure:
|
|||
};
|
||||
|
||||
The driver would then pass ``my_driver_api_funcs`` as the ``api`` argument to
|
||||
``DEVICE_AND_API_INIT()``, or manually assign it to ``device->driver_api``
|
||||
in the driver init function.
|
||||
``DEVICE_AND_API_INIT()``.
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue