NCP Interface#
Component that provides the Bluetooth Network Co-Processor (NCP) communication interface. This is a No-Code component.
Enumerations#
NCP error type.
Functions#
Macros#
Enumeration Documentation#
sl_ncp_error_t#
sl_ncp_error_t
NCP error type.
| Enumerator | |
|---|---|
| SL_NCP_ERROR_RUNTIME | |
| SL_NCP_ERROR_RECEIVE | |
| SL_NCP_ERROR_TIMER | |
| SL_NCP_ERROR_ENCRYPT | |
| SL_NCP_ERROR_BGAPI_LOCK | |
| SL_NCP_ERROR_EVT_ENQUE | |
Function Documentation#
sl_ncp_init#
void sl_ncp_init (void )
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| void | N/A | 
NCP initialization function.
sl_ncp_rta_ready#
void sl_ncp_rta_ready (void )
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| void | N/A | 
NCP runtime ready.
sl_ncp_user_cmd_message_to_target_cb#
void sl_ncp_user_cmd_message_to_target_cb (void * data)
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| void * | [in] | data | Data received from NCP through UART. | 
User command (message_to_target) handler callback.
Handle user defined commands received from NCP-host.
sl_ncp_user_cs_cmd_message_to_target_cb#
void sl_ncp_user_cs_cmd_message_to_target_cb (const void * data)
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| const void * | [in] | data | Data received from NCP through UART. | 
CS user command (message_to_target) handler callback.
Handle CS defined user commands received from NCP-host.
sl_ncp_user_cmd_message_to_target_rsp#
void sl_ncp_user_cmd_message_to_target_rsp (sl_status_t result, uint8_t len, uint8_t * data)
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| sl_status_t | [out] | result | Result of the response to the command received. | 
| uint8_t | [out] | len | Message length. | 
| uint8_t * | [out] | data | Data to send to NCP. | 
Send user command (message_to_target) response.
Send response to user defined (message_to_target) command to NCP-host.
sl_ncp_user_evt_message_to_host#
void sl_ncp_user_evt_message_to_host (uint8_t len, uint8_t * data)
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| uint8_t | [out] | len | Message length. | 
| uint8_t * | [out] | data | Data to send to NCP. | 
Send user event (message_to_host).
Send user defined (message_to_host) event to NCP-host.
sl_ncp_local_evt_process#
bool sl_ncp_local_evt_process (sl_bt_msg_t * evt)
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| sl_bt_msg_t * | [in] | evt | Bluetooth event. | 
Local event processor for handling Bluetooth events in the application.
Note
- This function can be implemented in the application. 
sl_ncp_local_common_evt_process#
bool sl_ncp_local_common_evt_process (sl_bt_msg_t * evt)
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| sl_bt_msg_t * | [in] | evt | Bluetooth event. | 
Process Bluetooth events locally using template contribution.
Note
- Automatically calls sl_ncp_local_evt_process after all component callback is finished. 
sl_ncp_on_error#
void sl_ncp_on_error (sl_ncp_error_t error, sl_status_t status)
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| sl_ncp_error_t | N/A | error | error type | 
| sl_status_t | N/A | status | status code | 
NCP runtime error callback.
Note
- The error callback is called when an error has occurred in the runtime context. The weak implementation asserts. It can be overridden in user code by adding a strong implementation.