Bluetooth NCP Transport over USART#
Component that provides transport layer for Bluetooth NCP over USART. This is a No-Code component if used together with NCP Interface or NCP Host Communication Interface components.
Enumerations#
enum
SL_BT_NCP_TRANSPORT_ERROR_INIT = 0
SL_BT_NCP_TRANSPORT_ERROR_RUNTIME = 1
SL_BT_NCP_TRANSPORT_ERROR_COM_HANDLE = 2
SL_BT_NCP_TRANSPORT_ERROR_TX_OVERFLOW = 3
SL_BT_NCP_TRANSPORT_ERROR_CLOCK = 4
SL_BT_NCP_TRANSPORT_ERROR_CLOSE = 5
SL_BT_NCP_TRANSPORT_ERROR_RX = 6
}
Bluetooth NCP Transport error type.
Functions#
void
sl_bt_ncp_transport_transmit(uint32_t len, const uint8_t *data)
void
sl_bt_ncp_transport_on_transmit(sl_status_t status)
void
void
sl_bt_ncp_transport_on_receive(sl_status_t status, uint32_t len, uint8_t *data)
void
sl_bt_ncp_transport_on_error(sl_bt_ncp_transport_error_t error, sl_status_t status)
Macros#
#define
#define
SL_BT_NCP_TRANSPORT_CPC_CONFIG_TASK_PRIO APP_RTA_PRIORITY_NORMAL
#define
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_STREAM_TYPE SL_IOSTREAM_TYPE_UART
#define
#define
#define
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_TASK_PRIO APP_RTA_PRIORITY_NORMAL
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_TASK_PRIO APP_RTA_PRIORITY_NORMAL
#define
#define
#define
SL_BT_NCP_TRANSPORT_USART_CONFIG_TASK_PRIO APP_RTA_PRIORITY_NORMAL
#define
Enumeration Documentation#
sl_bt_ncp_transport_error_t#
sl_bt_ncp_transport_error_t
Bluetooth NCP Transport error type.
| Enumerator | |
|---|---|
| SL_BT_NCP_TRANSPORT_ERROR_INIT | |
| SL_BT_NCP_TRANSPORT_ERROR_RUNTIME | |
| SL_BT_NCP_TRANSPORT_ERROR_COM_HANDLE | |
| SL_BT_NCP_TRANSPORT_ERROR_TX_OVERFLOW | |
| SL_BT_NCP_TRANSPORT_ERROR_CLOCK | |
| SL_BT_NCP_TRANSPORT_ERROR_CLOSE | |
| SL_BT_NCP_TRANSPORT_ERROR_RX | |
Function Documentation#
sl_bt_ncp_transport_transmit#
void sl_bt_ncp_transport_transmit (uint32_t len, const uint8_t * data)
Parameters
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint32_t | N/A | len | length of the data to transmit |
| const uint8_t * | N/A | data | data to transmit |
Transmit function
sl_bt_ncp_transport_on_transmit#
void sl_bt_ncp_transport_on_transmit (sl_status_t status)
Parameters
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_status_t | N/A | status |
Transmit completed callback
sl_bt_ncp_transport_receive#
void sl_bt_ncp_transport_receive (void )
Parameters
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Receive function
sl_bt_ncp_transport_on_receive#
void sl_bt_ncp_transport_on_receive (sl_status_t status, uint32_t len, uint8_t * data)
Parameters
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_status_t | N/A | status | status of the reception |
| uint32_t | N/A | len | length of the received data |
| uint8_t * | N/A | data | received data |
Receive completed callback
sl_bt_ncp_transport_on_error#
void sl_bt_ncp_transport_on_error (sl_bt_ncp_transport_error_t error, sl_status_t status)
Parameters
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_bt_ncp_transport_error_t | N/A | error | error type |
| sl_status_t | N/A | status | status code |
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.
Macro Definition Documentation#
SL_BT_NCP_TRANSPORT_CPC_CONFIG_TASK_PRIO#
#define SL_BT_NCP_TRANSPORT_CPC_CONFIG_TASK_PRIOValue:
APP_RTA_PRIORITY_NORMAL
SL_BT_NCP_TRANSPORT_CPC_CONFIG_TASK_STACK#
#define SL_BT_NCP_TRANSPORT_CPC_CONFIG_TASK_STACKValue:
1024
SL_BT_NCP_TRANSPORT_CPC_CONFIG_WAIT_FOR_GUARD#
#define SL_BT_NCP_TRANSPORT_CPC_CONFIG_WAIT_FOR_GUARDValue:
10
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_STREAM_TYPE#
#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_STREAM_TYPEValue:
SL_IOSTREAM_TYPE_UART
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_STREAM_INSTANCE#
#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_STREAM_INSTANCEValue:
"vcom"
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_SEPARATE_TX#
#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_SEPARATE_TXValue:
0
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_TASK_PRIO#
#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_TASK_PRIOValue:
APP_RTA_PRIORITY_NORMAL
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_TASK_STACK#
#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_TASK_STACKValue:
1024
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_WAIT_FOR_GUARD#
#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_WAIT_FOR_GUARDValue:
10
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_TASK_PRIO#
#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_TASK_PRIOValue:
APP_RTA_PRIORITY_NORMAL
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_TASK_STACK#
#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_TASK_STACKValue:
1024
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_WAIT_FOR_GUARD#
#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_WAIT_FOR_GUARDValue:
10
SL_BT_NCP_TRANSPORT_USART_CONFIG_TASK_PRIO#
#define SL_BT_NCP_TRANSPORT_USART_CONFIG_TASK_PRIOValue:
APP_RTA_PRIORITY_NORMAL
SL_BT_NCP_TRANSPORT_USART_CONFIG_TASK_STACK#
#define SL_BT_NCP_TRANSPORT_USART_CONFIG_TASK_STACKValue:
1024
SL_BT_NCP_TRANSPORT_USART_CONFIG_WAIT_FOR_GUARD#
#define SL_BT_NCP_TRANSPORT_USART_CONFIG_WAIT_FOR_GUARDValue:
10