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
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
SL_BT_NCP_TRANSPORT_CONFIG_TX_BUF_SIZE 260
#define
SL_BT_NCP_TRANSPORT_CPC_CONFIG_TASK_PRIO APP_RTA_PRIORITY_NORMAL
#define
SL_BT_NCP_TRANSPORT_CPC_CONFIG_TASK_STACK 1024
#define
SL_BT_NCP_TRANSPORT_CPC_CONFIG_WAIT_FOR_GUARD 10
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_STREAM_TYPE SL_IOSTREAM_TYPE_UART
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_STREAM_INSTANCE "vcom"
#define
SL_BT_NCP_TRANSPORT_CONFIG_RX_BUF_SIZE 520
#define
SL_BT_NCP_TRANSPORT_CONFIG_TX_BUF_SIZE 260
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_SEPARATE_TX 0
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_TASK_PRIO APP_RTA_PRIORITY_NORMAL
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_TASK_STACK 1024
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_WAIT_FOR_GUARD 10
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_TASK_PRIO APP_RTA_PRIORITY_NORMAL
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_TASK_STACK 1024
#define
SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_WAIT_FOR_GUARD 10
#define
SL_BT_NCP_TRANSPORT_CONFIG_RX_BUF_SIZE 520
#define
SL_BT_NCP_TRANSPORT_CONFIG_TX_BUF_SIZE 260
#define
SL_BT_NCP_TRANSPORT_USART_CONFIG_TASK_PRIO APP_RTA_PRIORITY_NORMAL
#define
SL_BT_NCP_TRANSPORT_USART_CONFIG_TASK_STACK 1024
#define
SL_BT_NCP_TRANSPORT_USART_CONFIG_WAIT_FOR_GUARD 10

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
TypeDirectionArgument NameDescription
uint32_tN/Alen

length of the data to transmit

const uint8_t *N/Adata

data to transmit

Transmit function


sl_bt_ncp_transport_on_transmit#

void sl_bt_ncp_transport_on_transmit (sl_status_t status)
Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

Transmit completed callback


sl_bt_ncp_transport_receive#

void sl_bt_ncp_transport_receive (void )
Parameters
TypeDirectionArgument NameDescription
voidN/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
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

status of the reception

uint32_tN/Alen

length of the received data

uint8_t *N/Adata

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
TypeDirectionArgument NameDescription
sl_bt_ncp_transport_error_tN/Aerror

error type

sl_status_tN/Astatus

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.