Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
HID Device Role (HIDD) over LE

This component maps features from the USB Human Interface Definition onto Bluetooth low energy GATT characteristics and descriptors. More...

Data Structures

struct  wiced_bt_hidd_ble_rpt_ref_t
 report reference descriptor value More...
 
struct  wiced_bt_hidd_ble_dev_info_t
 LE HIDD registration information. More...
 
struct  wiced_bt_hidd_ble_dscp_info_t
 HIDD LE description info. More...
 
struct  wiced_bt_hidd_ble_rpt_map_info_t
 LE HIDD report map info. More...
 
struct  wiced_bt_hidd_ble_rpt_data_t
 LE HIDD report data. More...
 
struct  wiced_bt_hidd_ble_get_rpt_data_t
 LE HIDD get report data. More...
 
union  wiced_bt_hidd_ble_cback_data_t
 HIDD LE callback data. More...
 
struct  wiced_bt_hidd_ble_reg_info_t
 HIDD LE registration info. More...
 

Macros

#define HIDD_LE_RPT_NOT_SUPT   0x8F
 GATT application error code for HID profile. More...
 
#define HIDD_LE_KB_TYPE   0x01
 HIDD type. More...
 
#define HIDD_LE_MICE_TYPE   0x02
 bit 1
 
#define HIDD_LE_OTHER_TYPE   0x80
 bit 7
 
#define HIDD_LE_PROTO_MODE_RPT   0x00
 Report protocol.
 
#define HIDD_LE_PROTO_MODE_BOOT   0x01
 Boot protocol.
 
#define HID_LE_RPT_TYPE_INPUT   0x01
 LE HIDD report type. More...
 
#define HID_LE_RPT_TYPE_OUTPUT   0x02
 Output reports.
 
#define HID_LE_RPT_TYPE_FEATURE   0x03
 Feature reports.
 
#define HID_LE_RPT_TYPE_KB_INPUT   0x04
 Keyboard input.
 
#define HID_LE_RPT_TYPE_KB_OUTPUT   0x05
 Keyboard output.
 
#define HID_LE_RPT_TYPE_MI_INPUT   0x06
 Mouse input.
 
#define HID_LE_RPT_TYPE_MAX   HID_LE_RPT_TYPE_FEATURE
 Maximun report type.
 
#define HIDD_LE_REMOTE_WAKE   0x01
 Remote wake.
 
#define HIDD_LE_NORMAL_CONN   0x02
 Normally connectable.
 
#define HIDD_REPT_ID_BOOT_KB   1
 Bluetooth HID Boot Report Keyboard.
 
#define HIDD_REPT_ID_BOOT_MOUSE   2
 Bluetooth HID Boot Report Mouse.
 

Typedefs

typedef uint8_t wiced_bt_hidd_ble_cback_event_t
 HIDD LE callback events.
 
typedef uint8_t wiced_bt_hidd_ble_dev_t
 HIDD LE device types.
 
typedef uint8_t wiced_bt_hidd_ble_proto_t
 HIDD LE protocol types.
 
typedef uint8_t wiced_bt_hidd_ble_rpt_t
 HIDD LE report types.
 
typedef uint8_t wiced_bt_hidd_ble_status_t
 HIDD LE status codes.
 
typedef void( wiced_bt_hidd_ble_cback_t )(uint8_t event, uint32_t data, wiced_bt_hidd_ble_cback_data_t *p_data)
 HIDD LE callback. More...
 

Enumerations

enum  wiced_bt_hidd_ble_cback_event_e {
  WICED_BT_HIDD_BLE_DEV_EVT_OPEN, WICED_BT_HIDD_BLE_DEV_EVT_CLOSE, WICED_BT_HIDD_BLE_DEV_EVT_GET_REPORT, WICED_BT_HIDD_BLE_DEV_EVT_SET_REPORT,
  WICED_BT_HIDD_BLE_DEV_EVT_GET_PROTO, WICED_BT_HIDD_BLE_DEV_EVT_SET_PROTO, WICED_BT_HIDD_BLE_DEV_EVT_DATA
}
 HID-LE-Device Callback Event Values. More...
 
enum  wiced_bt_hidd_ble_status {
  WICED_BT_HIDD_BLE_SUCCESS, WICED_BT_HIDD_BLE_ERR_NOT_REGISTERED, WICED_BT_HIDD_BLE_ERR_ALREADY_REGISTERED, WICED_BT_HIDD_BLE_ERR_NO_RESOURCES,
  WICED_BT_HIDD_BLE_ERR_NO_CONNECTION, WICED_BT_HIDD_BLE_ERR_INVALID_PARAM, WICED_BT_HIDD_BLE_ERR_UNSUPPORTED, WICED_BT_HIDD_BLE_ERR_UNKNOWN_COMMAND,
  WICED_BT_HIDD_BLE_ERR_CONGESTED, WICED_BT_HIDD_BLE_ERR_CONN_IN_PROCESS, WICED_BT_HIDD_BLE_ERR_ALREADY_CONN, WICED_BT_HIDD_BLE_ERR_DISCONNECTING,
  WICED_BT_HIDD_BLE_ERR_SET_CONNABLE_FAIL, WICED_BT_HIDD_BLE_ERR_HOST_UNKNOWN, WICED_BT_HIDD_BLE_ERR_L2CAP_FAILED, WICED_BT_HIDD_BLE_ERR_AUTH_FAILED,
  WICED_BT_HIDD_BLE_ERR_SDP_BUSY, WICED_BT_HIDD_BLE_ERR_GATT, WICED_BT_HIDD_BLE_ERR_INVALID = 0xFF
}
 HIDD LE status codes. More...
 

Functions

void wiced_bt_hidd_ble_init (void)
 Initialize HIDD LE control block and trace variable.
 
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_register (wiced_bt_hidd_ble_reg_info_t *p_reg_info)
 This function must be called at startup to register info related to HIDD over LE. More...
 
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_deregister (void)
 Disable HIDD service. More...
 
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_connect (void)
 Initiates a connection to the host. More...
 
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_disconnect (void)
 Disconnects from the host. More...
 
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_send_report (uint8_t rep_type, uint8_t rpt_id, uint16_t len, uint16_t offset, uint8_t *p_rpt)
 Sends report data to the host. More...
 
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_hand_shake (wiced_bt_hidd_ble_status_t status)
 Acks a set report request. More...
 
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_rsp_get_protocol (wiced_bt_hidd_ble_proto_t cur_mode)
 Responds to a get protocol mode request. More...
 
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_set_rsp_map_info (wiced_bt_hidd_ble_rpt_map_info_t *p_dev_info)
 This function shall be called at startup to configure the device HID information and report map. More...
 

Detailed Description

This component maps features from the USB Human Interface Definition onto Bluetooth low energy GATT characteristics and descriptors.

HIDD role defines a set of procedure that can be used by an application like to implement a HID device level functionality over LE transport.

Macro Definition Documentation

#define HID_LE_RPT_TYPE_INPUT   0x01

LE HIDD report type.

Input reports

#define HIDD_LE_KB_TYPE   0x01

HIDD type.

bit 0

#define HIDD_LE_RPT_NOT_SUPT   0x8F

GATT application error code for HID profile.

Report not supported

Typedef Documentation

typedef void( wiced_bt_hidd_ble_cback_t)(uint8_t event, uint32_t data, wiced_bt_hidd_ble_cback_data_t *p_data)

HIDD LE callback.

Callback for Human Interface Device Profile Device (HIDD)

Parameters
[in]event: Callback event
[in]data: Integer data corresponding to the event
[in]p_data: Callback data
Returns
void

Enumeration Type Documentation

HID-LE-Device Callback Event Values.

Enumerator
WICED_BT_HIDD_BLE_DEV_EVT_OPEN 

Connected to host with Interrupt and Control Data = 1 if Virtual Cable Channels in OPEN state.

pdata = Host BD-Addr.

WICED_BT_HIDD_BLE_DEV_EVT_CLOSE 

Connection with host is closed.

Data=Reason Code.

WICED_BT_HIDD_BLE_DEV_EVT_GET_REPORT 

Host sent GET_REPORT Data=Length pdata=structure having details of get-report.

WICED_BT_HIDD_BLE_DEV_EVT_SET_REPORT 

Host sent SET_REPORT Data=Length pdata=details.

WICED_BT_HIDD_BLE_DEV_EVT_GET_PROTO 

Host sent GET_PROTOCOL Data=NA.

WICED_BT_HIDD_BLE_DEV_EVT_SET_PROTO 

Host sent SET_PROTOCOL Data=1 for Report, 0 for Boot.

WICED_BT_HIDD_BLE_DEV_EVT_DATA 

General event data.

HIDD LE status codes.

Enumerator
WICED_BT_HIDD_BLE_SUCCESS 

Success.

WICED_BT_HIDD_BLE_ERR_NOT_REGISTERED 

Not registered.

WICED_BT_HIDD_BLE_ERR_ALREADY_REGISTERED 

Already registered.

WICED_BT_HIDD_BLE_ERR_NO_RESOURCES 

No resources.

WICED_BT_HIDD_BLE_ERR_NO_CONNECTION 

No connection.

WICED_BT_HIDD_BLE_ERR_INVALID_PARAM 

Invalid parameter.

WICED_BT_HIDD_BLE_ERR_UNSUPPORTED 

Not supported.

WICED_BT_HIDD_BLE_ERR_UNKNOWN_COMMAND 

Unknown command.

WICED_BT_HIDD_BLE_ERR_CONGESTED 

Congested.

WICED_BT_HIDD_BLE_ERR_CONN_IN_PROCESS 

Connection in process.

WICED_BT_HIDD_BLE_ERR_ALREADY_CONN 

Already connected.

WICED_BT_HIDD_BLE_ERR_DISCONNECTING 

Disconnecting in process.

WICED_BT_HIDD_BLE_ERR_SET_CONNABLE_FAIL 

Set connectable failiure.

WICED_BT_HIDD_BLE_ERR_HOST_UNKNOWN 

Host unknown.

WICED_BT_HIDD_BLE_ERR_L2CAP_FAILED 

L2CAP failed.

WICED_BT_HIDD_BLE_ERR_AUTH_FAILED 

Authentication failed.

WICED_BT_HIDD_BLE_ERR_SDP_BUSY 

SDP busy.

WICED_BT_HIDD_BLE_ERR_GATT 

GATT.

WICED_BT_HIDD_BLE_ERR_INVALID 

Invalid.

Function Documentation

wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_connect ( void  )

Initiates a connection to the host.

Returns
status code (see wiced_bt_hidd_ble_status_t)
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_deregister ( void  )

Disable HIDD service.

Returns
status code (see wiced_bt_hidd_ble_status_t)
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_disconnect ( void  )

Disconnects from the host.

Returns
status code (see wiced_bt_hidd_ble_status_t)
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_hand_shake ( wiced_bt_hidd_ble_status_t  status)

Acks a set report request.

Parameters
[in]statuscode (see wiced_bt_hidd_ble_status_t)
Returns
status code (see wiced_bt_hidd_ble_status_t)
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_register ( wiced_bt_hidd_ble_reg_info_t p_reg_info)

This function must be called at startup to register info related to HIDD over LE.

Parameters
[in]p_reg_info: SCO index to remove
Returns
status code (see wiced_bt_hidd_ble_status_t)
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_rsp_get_protocol ( wiced_bt_hidd_ble_proto_t  cur_mode)

Responds to a get protocol mode request.

Parameters
[in]cur_mode: Current protocol
Returns
status code (see wiced_bt_hidd_ble_status_t)
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_send_report ( uint8_t  rep_type,
uint8_t  rpt_id,
uint16_t  len,
uint16_t  offset,
uint8_t *  p_rpt 
)

Sends report data to the host.

Parameters
[in]rep_type: Report type
[in]rept_id: Report ID
[in]len: Length of the data
[in]offset: Offset of the data
[in]p_rpt: Pointer to the report data
Returns
status code (see wiced_bt_hidd_ble_status_t)
wiced_bt_hidd_ble_status_t wiced_bt_hidd_ble_set_rsp_map_info ( wiced_bt_hidd_ble_rpt_map_info_t p_dev_info)

This function shall be called at startup to configure the device HID information and report map.

Parameters
[in]p_dev_info: Device map info
Returns
status code (see wiced_bt_hidd_ble_status_t)