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
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 |
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