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)

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

Definition at line 47 of file common/ncp_transport/sl_bt_ncp_transport.h

Function Documentation#

sl_bt_ncp_transport_transmit#

void sl_bt_ncp_transport_transmit (uint32_t len, const uint8_t * data)
Parameters
N/Alen

length of the data to transmit

N/Adata

data to transmit

Transmit function


Definition at line 62 of file common/ncp_transport/sl_bt_ncp_transport.h

sl_bt_ncp_transport_on_transmit#

void sl_bt_ncp_transport_on_transmit (sl_status_t status)
Parameters
N/Astatus

Transmit completed callback


Definition at line 67 of file common/ncp_transport/sl_bt_ncp_transport.h

sl_bt_ncp_transport_receive#

void sl_bt_ncp_transport_receive (void )
Parameters
N/A

Receive function


Definition at line 72 of file common/ncp_transport/sl_bt_ncp_transport.h

sl_bt_ncp_transport_on_receive#

void sl_bt_ncp_transport_on_receive (sl_status_t status, uint32_t len, uint8_t * data)
Parameters
N/Astatus

status of the reception

N/Alen

length of the received data

N/Adata

received data

Receive completed callback


Definition at line 80 of file common/ncp_transport/sl_bt_ncp_transport.h

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
N/Aerror

error type

N/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.


Definition at line 92 of file common/ncp_transport/sl_bt_ncp_transport.h

Macro Definition Documentation#

SL_BT_NCP_TRANSPORT_CONFIG_TX_BUF_SIZE#

#define SL_BT_NCP_TRANSPORT_CONFIG_TX_BUF_SIZE
Value:
260

Definition at line 46 of file common/ncp_transport/config/sl_bt_ncp_transport_cpc_config.h

SL_BT_NCP_TRANSPORT_CPC_CONFIG_TASK_PRIO#

#define SL_BT_NCP_TRANSPORT_CPC_CONFIG_TASK_PRIO
Value:
APP_RTA_PRIORITY_NORMAL

Definition at line 60 of file common/ncp_transport/config/sl_bt_ncp_transport_cpc_config.h

SL_BT_NCP_TRANSPORT_CPC_CONFIG_TASK_STACK#

#define SL_BT_NCP_TRANSPORT_CPC_CONFIG_TASK_STACK
Value:
1024

Definition at line 65 of file common/ncp_transport/config/sl_bt_ncp_transport_cpc_config.h

SL_BT_NCP_TRANSPORT_CPC_CONFIG_WAIT_FOR_GUARD#

#define SL_BT_NCP_TRANSPORT_CPC_CONFIG_WAIT_FOR_GUARD
Value:
10

Definition at line 70 of file common/ncp_transport/config/sl_bt_ncp_transport_cpc_config.h

SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_STREAM_TYPE#

#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_STREAM_TYPE
Value:
SL_IOSTREAM_TYPE_UART

Definition at line 50 of file common/ncp_transport/config/sl_bt_ncp_transport_iostream_config.h

SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_STREAM_INSTANCE#

#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_STREAM_INSTANCE
Value:
"vcom"

Definition at line 54 of file common/ncp_transport/config/sl_bt_ncp_transport_iostream_config.h

SL_BT_NCP_TRANSPORT_CONFIG_RX_BUF_SIZE#

#define SL_BT_NCP_TRANSPORT_CONFIG_RX_BUF_SIZE
Value:
520

Definition at line 63 of file common/ncp_transport/config/sl_bt_ncp_transport_iostream_config.h

SL_BT_NCP_TRANSPORT_CONFIG_TX_BUF_SIZE#

#define SL_BT_NCP_TRANSPORT_CONFIG_TX_BUF_SIZE
Value:
260

Definition at line 68 of file common/ncp_transport/config/sl_bt_ncp_transport_iostream_config.h

SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_SEPARATE_TX#

#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_SEPARATE_TX
Value:
0

Definition at line 77 of file common/ncp_transport/config/sl_bt_ncp_transport_iostream_config.h

SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_TASK_PRIO#

#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_TASK_PRIO
Value:
APP_RTA_PRIORITY_NORMAL

Definition at line 87 of file common/ncp_transport/config/sl_bt_ncp_transport_iostream_config.h

SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_TASK_STACK#

#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_TASK_STACK
Value:
1024

Definition at line 92 of file common/ncp_transport/config/sl_bt_ncp_transport_iostream_config.h

SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_WAIT_FOR_GUARD#

#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_TX_WAIT_FOR_GUARD
Value:
10

Definition at line 97 of file common/ncp_transport/config/sl_bt_ncp_transport_iostream_config.h

SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_TASK_PRIO#

#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_TASK_PRIO
Value:
APP_RTA_PRIORITY_NORMAL

Definition at line 107 of file common/ncp_transport/config/sl_bt_ncp_transport_iostream_config.h

SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_TASK_STACK#

#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_TASK_STACK
Value:
1024

Definition at line 112 of file common/ncp_transport/config/sl_bt_ncp_transport_iostream_config.h

SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_WAIT_FOR_GUARD#

#define SL_BT_NCP_TRANSPORT_IOSTREAM_CONFIG_RX_WAIT_FOR_GUARD
Value:
10

Definition at line 117 of file common/ncp_transport/config/sl_bt_ncp_transport_iostream_config.h

SL_BT_NCP_TRANSPORT_CONFIG_RX_BUF_SIZE#

#define SL_BT_NCP_TRANSPORT_CONFIG_RX_BUF_SIZE
Value:
520

Definition at line 46 of file common/ncp_transport/config/sl_bt_ncp_transport_usart_config.h

SL_BT_NCP_TRANSPORT_CONFIG_TX_BUF_SIZE#

#define SL_BT_NCP_TRANSPORT_CONFIG_TX_BUF_SIZE
Value:
260

Definition at line 51 of file common/ncp_transport/config/sl_bt_ncp_transport_usart_config.h

SL_BT_NCP_TRANSPORT_USART_CONFIG_TASK_PRIO#

#define SL_BT_NCP_TRANSPORT_USART_CONFIG_TASK_PRIO
Value:
APP_RTA_PRIORITY_NORMAL

Definition at line 65 of file common/ncp_transport/config/sl_bt_ncp_transport_usart_config.h

SL_BT_NCP_TRANSPORT_USART_CONFIG_TASK_STACK#

#define SL_BT_NCP_TRANSPORT_USART_CONFIG_TASK_STACK
Value:
1024

Definition at line 70 of file common/ncp_transport/config/sl_bt_ncp_transport_usart_config.h

SL_BT_NCP_TRANSPORT_USART_CONFIG_WAIT_FOR_GUARD#

#define SL_BT_NCP_TRANSPORT_USART_CONFIG_WAIT_FOR_GUARD
Value:
10

Definition at line 75 of file common/ncp_transport/config/sl_bt_ncp_transport_usart_config.h