38.1.5.6 usart_async_register_callback
Register USART callback.
int32_t usart_async_register_callback(
struct usart_async_descriptor *const descr,
const enum usart_async_callback_type type,
usart_cb_t cb
)
Parameters
- descr
-
Type: struct usart_async_descriptor Struct *const
A USART descriptor which is used to communicate via USART
- type
-
Type: const enum usart_async_callback_type Enum
Callback type
- cb
-
Type: usart_cb_t typedef
A callback function
Returns
Type: int32_t
The status of callback assignment.
- -1
-
Passed parameters were invalid or the interface is not initialized
- 0
-
A callback is registered successfully