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

Definitions the interfaces for the AIROC Host Controller Interface. More...

Data Structures

struct  wiced_hci_channel_t
 

Macros

#define WICED_HCI_CHANNEL_INSTANCE_SIZE   36
 Defines the wiced hci channel instance size.
 
#define WICED_HCI_INVALID_CHANNEL   0xFFFF
 Defines the size of wiced hci invalid channel.
 
#define WICED_TRANS_HEADER_SIZE   4
 Wiced trans header size = 4 bytes 2 bytes - opcode, 2 bytes - length.
 
#define HCI_EVENT_WICED_TRACE   0x02 /* Wiced HCI trace */
 
#define HCI_EVENT_HCI_TRACE   0x03 /* Bluetooth protocol trace */
 

Typedefs

typedef uint8_t wiced_hci_ep_t
 
typedef uint8_t(* wiced_hci_data_handler_t )(uint8_t *data_ptr, uint32_t data_len)
 
typedef void(* wiced_hci_data_sink_t )(uint8_t *buf, uint32_t len, uint32_t sink_ctx)
 

Enumerations

enum  wiced_hci_port_t {
  WICED_HCI_PORT_1 = 0, WICED_HCI_PORT_2 = 1, WICED_HCI_PORT_3 = 2, WICED_HCI_PORT_4 = 3,
  WICED_HCI_PORT_5 = 4
}
 
enum  wiced_hci_dir_t { WICED_HCI_DIR_DEVICE_IN = 0, WICED_HCI_DIR_DEVICE_OUT = 1 }
 
enum  wiced_hci_channel_type_t { WICED_HCI_CTRL = 0, WICED_HCI_DATA = 1 }
 

Functions

wiced_result_t wiced_init_hci_channel (wiced_hci_channel_t *p_channel, wiced_hci_port_t port, wiced_hci_channel_type_t type, wiced_hci_ep_t ep, wiced_hci_dir_t dir)
 Configures the hci channel. More...
 
uint32_t wiced_open_hci_channel (wiced_hci_channel_t *p_channel)
 Opens a channel for data transfer Channel should be initialized before opening the channel. More...
 
wiced_result_t wiced_close_hci_channel (wiced_hci_channel_t *p_channel)
 Closes the hci channel. More...
 
wiced_result_t wiced_deinit_hci_channel (wiced_hci_channel_t *p_channel)
 Deletes the hci channel. More...
 
wiced_result_t wiced_attach_sink_hci_channel (wiced_hci_channel_t *p_channel, wiced_hci_data_sink_t sink, uint32_t sink_ctx)
 Attaches a sink to the hci channel. More...
 
wiced_result_t wiced_send_hci_channel (wiced_hci_channel_t *p_channel, uint8_t *p_data, uint32_t data_len)
 Sends data through the channel. More...
 
wiced_result_t wiced_flush_hci_channel (wiced_hci_channel_t *p_channel)
 Flushes the data from the channel. More...
 

Detailed Description

Definitions the interfaces for the AIROC Host Controller Interface.

Enumeration Type Documentation

Enumerator
WICED_HCI_PORT_1 

Reserved.

WICED_HCI_PORT_2 

Reserved.

WICED_HCI_PORT_3 

Reserved.

WICED_HCI_PORT_4 

Used for raw data transfers.

WICED_HCI_PORT_5 

Verify if this port is usable.

Max ports available is only 5

Function Documentation

wiced_result_t wiced_attach_sink_hci_channel ( wiced_hci_channel_t p_channel,
wiced_hci_data_sink_t  sink,
uint32_t  sink_ctx 
)

Attaches a sink to the hci channel.

Parameters
[in]p_channel:Pointer to the hci channel
[in]sink:Pointer to the sink handler
[in]sink_ctx:Any context info that the handler would need.
Returns
wiced_result_t
wiced_result_t wiced_close_hci_channel ( wiced_hci_channel_t p_channel)

Closes the hci channel.

Parameters
[in]p_channel:Pointer to the hci channel
Returns
wiced_result_t
wiced_result_t wiced_deinit_hci_channel ( wiced_hci_channel_t p_channel)

Deletes the hci channel.

instance Deletes the memory associated with the hci channel

Parameters
[in]p_channel:Pointer to the hci channel
Returns
None
wiced_result_t wiced_flush_hci_channel ( wiced_hci_channel_t p_channel)

Flushes the data from the channel.

Parameters
[in]p_channel:Pointer to the hci channel
Returns
wiced_result_t
wiced_result_t wiced_init_hci_channel ( wiced_hci_channel_t p_channel,
wiced_hci_port_t  port,
wiced_hci_channel_type_t  type,
wiced_hci_ep_t  ep,
wiced_hci_dir_t  dir 
)

Configures the hci channel.

Parameters
[in]p_channel:Pointer to the hci channel
[in]port:Port Id
[in]type:Channel type
[in]ep:HCI Channel EP Addess
[in]dir:HCI Channel Direction
Returns
wiced_result_t
uint32_t wiced_open_hci_channel ( wiced_hci_channel_t p_channel)

Opens a channel for data transfer Channel should be initialized before opening the channel.

Parameters
[in]p_channel:Pointer to the hci channel
Returns
channel id on success, WICED_HCI_INVALID_CHANNEL, on failure
wiced_result_t wiced_send_hci_channel ( wiced_hci_channel_t p_channel,
uint8_t *  p_data,
uint32_t  data_len 
)

Sends data through the channel.

Parameters
[in]p_channel:Pointer to the hci channel
[in]p_data:Data buffer pointer
[in]data_len:Length of Data
Returns
wiced_result_t