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 |
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/A | len | length of the data to transmit |
N/A | data | 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/A | status |
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/A | status | status of the reception |
N/A | len | length of the received data |
N/A | data | 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/A | error | error type |
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.
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_SIZEValue:
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_PRIOValue:
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_STACKValue:
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_GUARDValue:
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_TYPEValue:
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_INSTANCEValue:
"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_SIZEValue:
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_SIZEValue:
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_TXValue:
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_PRIOValue:
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_STACKValue:
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_GUARDValue:
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_PRIOValue:
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_STACKValue:
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_GUARDValue:
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_SIZEValue:
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_SIZEValue:
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_PRIOValue:
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_STACKValue:
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_GUARDValue:
10
Definition at line
75
of file common/ncp_transport/config/sl_bt_ncp_transport_usart_config.h