|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Bluetooth RFCOMM handling. More...
#include <zephyr/bluetooth/buf.h>#include <zephyr/bluetooth/conn.h>#include <zephyr/bluetooth/l2cap.h>#include <zephyr/sys/slist.h>Go to the source code of this file.
Data Structures | |
| struct | bt_rfcomm_dlc_ops |
| RFCOMM DLC operations structure. More... | |
| struct | bt_rfcomm_dlc |
| RFCOMM DLC structure. More... | |
| struct | bt_rfcomm_server |
| struct | bt_rfcomm_rpn |
| RFCOMM Remote Port Negotiation (RPN) structure. More... | |
Macros | |
| #define | BT_RFCOMM_HDR_MAX_SIZE 4 |
| RFCOMM Maximum Header Size. | |
| #define | BT_RFCOMM_FCS_SIZE 1 |
| RFCOMM FCS Size. | |
| #define | BT_RFCOMM_CREDITS_SIZE 1 |
| RFCOMM Credits Size. | |
| #define | BT_RFCOMM_OVERHEAD_SIZE (BT_RFCOMM_HDR_MAX_SIZE + BT_RFCOMM_FCS_SIZE + BT_RFCOMM_CREDITS_SIZE) |
| RFCOMM Overhead Size. | |
| #define | BT_RFCOMM_BUF_SIZE(mtu) |
| Helper to calculate needed buffer size for RFCOMM PDUs. | |
| #define | BT_RFCOMM_SET_LINE_SETTINGS(data, stop, parity) |
| Combine data bits, stop bits and parity into a single line settings byte. | |
| #define | BT_RFCOMM_RPN_FLOW_NONE 0x00 |
| #define | BT_RFCOMM_RPN_XON_CHAR 0x11 |
| #define | BT_RFCOMM_RPN_XOFF_CHAR 0x13 |
| #define | BT_RFCOMM_RPN_PARAM_MASK_ALL 0x3f7f |
| #define | BT_RFCOMM_RLS_NO_ERR (0x00U) |
| Remote Line Status value: No error. | |
| #define | BT_RFCOMM_RLS_ERR(err) |
| Remote Line Status value: error occurred. | |
| #define | BT_RFCOMM_RLS_ERR_OVERRUN_ERROR BIT(1) |
| Overrun Error - Received character overwrote an unread character. | |
| #define | BT_RFCOMM_RLS_ERR_PARITY_ERROR BIT(2) |
| Parity Error - Received character's parity was incorrect. | |
| #define | BT_RFCOMM_RLS_ERR_FRAMING_ERROR BIT(3) |
| Framing Error - a character did not terminate with a stop bit. | |
Typedefs | |
| typedef enum bt_rfcomm_role | bt_rfcomm_role_t |
| Role of RFCOMM session and dlc. | |
Functions | |
| int | bt_rfcomm_server_register (struct bt_rfcomm_server *server) |
| Register RFCOMM server. | |
| int | bt_rfcomm_server_unregister (struct bt_rfcomm_server *server) |
| Unregister RFCOMM server. | |
| int | bt_rfcomm_dlc_connect (struct bt_conn *conn, struct bt_rfcomm_dlc *dlc, uint8_t channel) |
| Connect RFCOMM channel. | |
| int | bt_rfcomm_dlc_send (struct bt_rfcomm_dlc *dlc, struct net_buf *buf) |
| Send data to RFCOMM. | |
| int | bt_rfcomm_dlc_disconnect (struct bt_rfcomm_dlc *dlc) |
| Disconnect RFCOMM dlc. | |
| struct net_buf * | bt_rfcomm_create_pdu (struct net_buf_pool *pool) |
| Allocate the buffer from pool after reserving head room for RFCOMM, L2CAP and ACL headers. | |
| int | bt_rfcomm_send_rpn_cmd (struct bt_rfcomm_dlc *dlc, struct bt_rfcomm_rpn *rpn) |
| Send Remote Port Negotiation command. | |
| int | bt_rfcomm_send_rls_cmd (struct bt_rfcomm_dlc *dlc, uint8_t line_status) |
| Send Remote Line Status Command. | |
Bluetooth RFCOMM handling.