Infineon Logo AIROC BTSDK v4.4 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
wiced_bt_rfcomm.h File Reference

Bluetooth RFCOMM Application Programming Interface. More...

Macros

#define PORT_MASK_ALL
 RFCOMM Port Mask to enable all. More...
 

Typedefs

typedef enum
wiced_bt_rfcomm_port_event_e 
wiced_bt_rfcomm_port_event_t
 RFCOMM Port Event Masks.
 
typedef int wiced_bt_rfcomm_result_t
 RFCOMM result code (see wiced_bt_rfcomm_result_e)
 
typedef uint8_t wiced_bt_rfcomm_signal_t
 RFCOMM Signals (see wiced_bt_rfcomm_signal_e)
 
typedef void( wiced_bt_port_mgmt_cback_t )(wiced_bt_rfcomm_result_t code, uint16_t port_handle)
 Port management callback. More...
 
typedef void( wiced_bt_port_event_cback_t )(wiced_bt_rfcomm_port_event_t event, uint16_t port_handle)
 Port event callback. More...
 
typedef void( wiced_bt_port_tx_cback_t )(uint16_t port_handle, void *p_data)
 Port TX Complete callback. More...
 

Enumerations

enum  wiced_bt_rfcomm_port_event_e {
  PORT_EV_NONE = 0x00000000, PORT_EV_RXCHAR = 0x00000001, PORT_EV_RXFLAG = 0x00000002, PORT_EV_TXEMPTY = 0x00000004,
  PORT_EV_CTS = 0x00000008, PORT_EV_DSR = 0x00000010, PORT_EV_RLSD = 0x00000020, PORT_EV_BREAK = 0x00000040,
  PORT_EV_ERR = 0x00000080, PORT_EV_RING = 0x00000100, PORT_EV_CTSS = 0x00000400, PORT_EV_DSRS = 0x00000800,
  PORT_EV_RLSDS = 0x00001000, PORT_EV_OVERRUN = 0x00002000, PORT_EV_CONNECTED = 0x00000200, PORT_EV_CONNECT_ERR = 0x00008000,
  PORT_EV_FC = 0x00010000, PORT_EV_FCS = 0x00020000
}
 RFCOMM Port Event Masks. More...
 
enum  wiced_bt_rfcomm_result_e {
  WICED_BT_RFCOMM_SUCCESS, WICED_BT_RFCOMM_ERROR, WICED_BT_RFCOMM_ALREADY_OPENED, WICED_BT_RFCOMM_CMD_PENDING,
  WICED_BT_RFCOMM_APP_NOT_REGISTERED, WICED_BT_RFCOMM_NO_MEM, WICED_BT_RFCOMM_NO_RESOURCES, WICED_BT_RFCOMM_BAD_BD_ADDR,
  WICED_BT_RFCOMM_INVALID_MTU, WICED_BT_RFCOMM_BAD_HANDLE, WICED_BT_RFCOMM_NOT_OPENED, WICED_BT_RFCOMM_LINE_ERR,
  WICED_BT_RFCOMM_START_FAILED, WICED_BT_RFCOMM_PAR_NEG_FAILED, WICED_BT_RFCOMM_RFCOMM_NEG_FAILED, WICED_BT_RFCOMM_PEER_CONNECTION_FAILED,
  WICED_BT_RFCOMM_PEER_FAILED, WICED_BT_RFCOMM_PEER_TIMEOUT, WICED_BT_RFCOMM_CLOSED, WICED_BT_RFCOMM_TX_FULL,
  WICED_BT_RFCOMM_LOCAL_CLOSED, WICED_BT_RFCOMM_LOCAL_TIMEOUT, WICED_BT_RFCOMM_TX_QUEUE_DISABLED, WICED_BT_RFCOMM_PAGE_TIMEOUT,
  WICED_BT_RFCOMM_INVALID_SCN
}
 RFCOMM Result Codes. More...
 
enum  wiced_bt_rfcomm_signal_e {
  PORT_SET_DTRDSR =0x01, PORT_CLR_DTRDSR, PORT_SET_CTSRTS, PORT_CLR_CTSRTS,
  PORT_SET_RI, PORT_CLR_RI, PORT_SET_DCD, PORT_CLR_DCD,
  PORT_BREAK
}
 RFCOMM Signals. More...
 

Functions

wiced_bt_rfcomm_result_t wiced_bt_rfcomm_create_connection (uint16_t uuid, uint8_t scn, wiced_bool_t is_server, uint16_t mtu, wiced_bt_device_address_t bd_addr, uint16_t *p_handle, wiced_bt_port_mgmt_cback_t *p_mgmt_cb)
 Establish serial port connection to the peer device, or allow RFCOMM to accept a connection from peer devices. More...
 
wiced_bt_rfcomm_result_t wiced_bt_rfcomm_remove_connection (uint16_t handle, wiced_bool_t remove_server)
 Close the specified connection. More...
 
wiced_bt_rfcomm_result_t wiced_bt_rfcomm_set_event_callback (uint16_t port_handle, wiced_bt_port_event_cback_t *p_port_cb, wiced_bt_port_tx_cback_t *p_tx_cmpl_cb)
 Set event callback the specified connection(neither of the callback can be NULL). More...
 
wiced_bt_rfcomm_result_t wiced_bt_rfcomm_set_event_mask (uint16_t port_handle, wiced_bt_rfcomm_port_event_t mask)
 Set events for which to be notified. More...
 
wiced_bt_rfcomm_result_t wiced_bt_rfcomm_control (uint16_t handle, uint8_t signal)
 Send control signal to the peer device. More...
 
wiced_bt_rfcomm_result_t wiced_bt_rfcomm_flow_control (uint16_t handle, wiced_bool_t enable)
 This function directs a specified connection to pass flow control message to the peer device. More...
 
wiced_bt_rfcomm_result_t wiced_bt_rfcomm_set_rx_fifo (uint16_t handle, char *p_mem, uint16_t size)
 This function provides RFCOMM with a data area to receive peer's data. More...
 
wiced_bt_rfcomm_result_t wiced_bt_rfcomm_read_data (uint16_t handle, char *p_data, uint16_t max_len, uint16_t *p_len)
 This function reads the received application data from the peer device. More...
 
wiced_bt_rfcomm_result_t wiced_bt_rfcomm_write_data (uint16_t handle, char *p_data, uint16_t max_len)
 This function sends the given application data to the peer device. More...
 
wiced_bt_rfcomm_result_t wiced_bt_rfcomm_check_connection (uint16_t handle, wiced_bt_device_address_t bd_addr, uint16_t *p_lcid)
 This function checks connection referenced by handle is up and running. More...
 

Detailed Description

Bluetooth RFCOMM Application Programming Interface.