Android Hardware Abstraction Layer
Data Structures | Macros | Typedefs | Enumerations
bt_hh.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  bthh_hid_info_t
 
struct  bthh_callbacks_t
 
struct  bthh_interface_t
 

Macros

#define BTHH_MAX_DSC_LEN   884
 

Typedefs

typedef void(* bthh_connection_state_callback )(bt_bdaddr_t *bd_addr, bthh_connection_state_t state)
 
typedef void(* bthh_virtual_unplug_callback )(bt_bdaddr_t *bd_addr, bthh_status_t hh_status)
 
typedef void(* bthh_hid_info_callback )(bt_bdaddr_t *bd_addr, bthh_hid_info_t hid_info)
 
typedef void(* bthh_protocol_mode_callback )(bt_bdaddr_t *bd_addr, bthh_status_t hh_status, bthh_protocol_mode_t mode)
 
typedef void(* bthh_idle_time_callback )(bt_bdaddr_t *bd_addr, bthh_status_t hh_status, int idle_rate)
 
typedef void(* bthh_get_report_callback )(bt_bdaddr_t *bd_addr, bthh_status_t hh_status, uint8_t *rpt_data, int rpt_size)
 

Enumerations

enum  bthh_connection_state_t {
  BTHH_CONN_STATE_CONNECTED = 0, BTHH_CONN_STATE_CONNECTING, BTHH_CONN_STATE_DISCONNECTED, BTHH_CONN_STATE_DISCONNECTING,
  BTHH_CONN_STATE_FAILED_MOUSE_FROM_HOST, BTHH_CONN_STATE_FAILED_KBD_FROM_HOST, BTHH_CONN_STATE_FAILED_TOO_MANY_DEVICES, BTHH_CONN_STATE_FAILED_NO_BTHID_DRIVER,
  BTHH_CONN_STATE_FAILED_GENERIC, BTHH_CONN_STATE_UNKNOWN
}
 
enum  bthh_status_t {
  BTHH_OK = 0, BTHH_HS_HID_NOT_READY, BTHH_HS_INVALID_RPT_ID, BTHH_HS_TRANS_NOT_SPT,
  BTHH_HS_INVALID_PARAM, BTHH_HS_ERROR, BTHH_ERR, BTHH_ERR_SDP,
  BTHH_ERR_PROTO, BTHH_ERR_DB_FULL, BTHH_ERR_TOD_UNSPT, BTHH_ERR_NO_RES,
  BTHH_ERR_AUTH_FAILED, BTHH_ERR_HDL
}
 
enum  bthh_protocol_mode_t { BTHH_REPORT_MODE = 0x00, BTHH_BOOT_MODE = 0x01, BTHH_UNSUPPORTED_MODE = 0xff }
 
enum  bthh_report_type_t { BTHH_INPUT_REPORT = 1, BTHH_OUTPUT_REPORT, BTHH_FEATURE_REPORT }
 

Macro Definition Documentation

#define BTHH_MAX_DSC_LEN   884

Definition at line 24 of file bt_hh.h.

Typedef Documentation

typedef void(* bthh_connection_state_callback)(bt_bdaddr_t *bd_addr, bthh_connection_state_t state)

Callback for connection state change. state will have one of the values from bthh_connection_state_t

Definition at line 90 of file bt_hh.h.

typedef void(* bthh_get_report_callback)(bt_bdaddr_t *bd_addr, bthh_status_t hh_status, uint8_t *rpt_data, int rpt_size)

Callback for get report api. if staus is ok rpt_data contains the report data

Definition at line 115 of file bt_hh.h.

typedef void(* bthh_hid_info_callback)(bt_bdaddr_t *bd_addr, bthh_hid_info_t hid_info)

Callback for get hid info hid_info will contain attr_mask, sub_class, app_id, vendor_id, product_id, version, ctry_code, len

Definition at line 100 of file bt_hh.h.

typedef void(* bthh_idle_time_callback)(bt_bdaddr_t *bd_addr, bthh_status_t hh_status, int idle_rate)

Callback for get/set_idle_time api.

Definition at line 109 of file bt_hh.h.

typedef void(* bthh_protocol_mode_callback)(bt_bdaddr_t *bd_addr, bthh_status_t hh_status, bthh_protocol_mode_t mode)

Callback for get/set protocal api. the protocol mode is one of the value from bthh_protocol_mode_t

Definition at line 105 of file bt_hh.h.

typedef void(* bthh_virtual_unplug_callback)(bt_bdaddr_t *bd_addr, bthh_status_t hh_status)

Callback for vitual unplug api. the status of the vitual unplug

Definition at line 95 of file bt_hh.h.

Enumeration Type Documentation

Enumerator
BTHH_CONN_STATE_CONNECTED 
BTHH_CONN_STATE_CONNECTING 
BTHH_CONN_STATE_DISCONNECTED 
BTHH_CONN_STATE_DISCONNECTING 
BTHH_CONN_STATE_FAILED_MOUSE_FROM_HOST 
BTHH_CONN_STATE_FAILED_KBD_FROM_HOST 
BTHH_CONN_STATE_FAILED_TOO_MANY_DEVICES 
BTHH_CONN_STATE_FAILED_NO_BTHID_DRIVER 
BTHH_CONN_STATE_FAILED_GENERIC 
BTHH_CONN_STATE_UNKNOWN 

Definition at line 27 of file bt_hh.h.

Enumerator
BTHH_REPORT_MODE 
BTHH_BOOT_MODE 
BTHH_UNSUPPORTED_MODE 

Definition at line 61 of file bt_hh.h.

Enumerator
BTHH_INPUT_REPORT 
BTHH_OUTPUT_REPORT 
BTHH_FEATURE_REPORT 

Definition at line 68 of file bt_hh.h.

Enumerator
BTHH_OK 
BTHH_HS_HID_NOT_READY 
BTHH_HS_INVALID_RPT_ID 
BTHH_HS_TRANS_NOT_SPT 
BTHH_HS_INVALID_PARAM 
BTHH_HS_ERROR 
BTHH_ERR 
BTHH_ERR_SDP 
BTHH_ERR_PROTO 
BTHH_ERR_DB_FULL 
BTHH_ERR_TOD_UNSPT 
BTHH_ERR_NO_RES 
BTHH_ERR_AUTH_FAILED 
BTHH_ERR_HDL 

Definition at line 41 of file bt_hh.h.