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

AIROC BLEHIDD COMMON APIs for Human Interface Device Profile (HID) Device over LE. More...

Data Structures

struct  wiced_hidd_app_event_queue_t
 
struct  wiced_blehidd_report_gatt_characteristic_t
 
struct  wiced_bt_hidd_pm_sniff_params
 Sniff parameters. More...
 
struct  wiced_bt_hidd_pm_pwr_state_t
 parameters at any given power state More...
 

Typedefs

typedef uint8_t wiced_hidd_report_type_t
 
typedef void( wiced_blehidd_write_cback_t )(wiced_hidd_report_type_t reportType, uint8_t reportId, void *payload, uint16_t payloadSize)
 

Enumerations

enum  { PROTOCOL_BOOT = 0, PROTOCOL_REPORT = 1 }
 
enum  wiced_hidd_report_type_e {
  WICED_HID_REPORT_TYPE_OTHER = 0, WICED_HID_REPORT_TYPE_INPUT = 1, WICED_HID_REPORT_TYPE_OUTPUT = 2, WICED_HID_REPORT_TYPE_FEATURE = 3,
  WICED_HID_CLIENT_CHAR_CONF = 4
}
 
enum  {
  POWER_MODE_HIGH = 1, POWER_MODE_LOW, POWER_MODE_IDLE, POWER_MODE_BFC_SUSPEND = 0xF0,
  POWER_MODE_DISCONNECT = 0xF1
}
 BR/EDR link power state/mode. More...
 
enum  { SNIFF_NORMAL = 0, SNIFF_ASYMMETRIC }
 Sniff type. More...
 
enum  wiced_hidd_pwmbuz_freq_e {
  WICED_PWMBUZ_125 = 0, WICED_PWMBUZ_250 = 1, WICED_PWMBUZ_500 = 2, WICED_PWMBUZ_1000 = 3,
  WICED_PWMBUZ_2000 = 4, WICED_PWMBUZ_4000 = 5, WICED_PWMBUZ_8000 = 6, WICED_PWMBUZ_FREQ_MAX = 7,
  WICED_PWMBUZ_FREQ_MANUAL = 0xFF
}
 

Functions

void wiced_hidd_app_init (wiced_bt_device_type_t dev_type)
 Does the necessary initialization for HID Device. More...
 
void wiced_hidd_register_callback_for_poll_event (wiced_bt_transport_t transport_type, BD_ADDR peer_bdaddr, wiced_bool_t enabled, void(*callback)(void *, uint32_t))
 Register with the controller with callback function, which will be called just before the poll event from the central if enabled. More...
 
void wiced_hidd_event_queue_init (wiced_hidd_app_event_queue_t *theq, void *bufStart_c, uint8_t elementSize_c, uint8_t maxNumElements_c)
 Constructor for the circular queue. More...
 
void wiced_hidd_event_queue_flush (wiced_hidd_app_event_queue_t *theq)
 Discards all elements in the queue, including any elements in the overflow slot. More...
 
uint8_t wiced_hidd_event_queue_get_num_elements (wiced_hidd_app_event_queue_t *theq)
 Gets the number of elements currently in the queue. More...
 
void * wiced_hidd_event_queue_get_current_element (wiced_hidd_app_event_queue_t *theq)
 Returns pointer to the first element in the queue. More...
 
void wiced_hidd_event_queue_remove_current_element (wiced_hidd_app_event_queue_t *theq)
 Removes the current element from the queue. More...
 
void wiced_hidd_event_queue_add_event_with_overflow (wiced_hidd_app_event_queue_t *theq, HidEvent *event, uint8_t len, uint8_t pollSeqn)
 Queue the given event into the event fifo. More...
 
uint32_t wiced_hidd_get_current_native_bt_clock (void)
 Get the current native Bluetooth clock This counter is 28 bits, and ticks every 312.5 us and is adjusted for drift through sleep, etc. More...
 
uint32_t wiced_hidd_get_bt_clocks_since (uint32_t before)
 Compute the time elapsed since "before", in Bluetooth clocks. More...
 
wiced_bool_t wiced_hidd_is_transport_detection_polling_on (void)
 Check if transport (UART, USB etc.) detection polling is still on-going. More...
 
wiced_bool_t wiced_hidd_is_transport_detected (void)
 Check if transport (UART, USB etc.) is detected. More...
 
wiced_bool_t wiced_blehidd_is_link_encrypted (void)
 Check if the current LE connection is encrypted. More...
 
void wiced_blehidd_set_link_encrypted_flag (wiced_bool_t is_encrypted)
 set the encrypted flag for the current LE connection we ask application to set the flag, so that it will be saved in always on (AON) memory when entering shutdown sleep (SDS) and restored when exiting SDS More...
 
wiced_bool_t wiced_blehidd_is_device_bonded (void)
 Check if the current LE connected device is bonded with us. More...
 
void wiced_blehidd_set_device_bonded_flag (wiced_bool_t is_bonded)
 set the bonded flag for the current LE connected device. More...
 
uint8_t * wiced_blehidd_get_peer_addr (void)
 Get the peer (current LE connected) device BD Address. More...
 
uint8_t wiced_blehidd_get_peer_addr_type (void)
 Get the peer (current LE connected) device address Type. More...
 
uint16_t wiced_blehidd_get_connection_interval (void)
 Get Connection Interval. More...
 
uint16_t wiced_blehidd_get_peripheral_latency (void)
 Get Connection Peripheral Latency. More...
 
uint16_t wiced_blehidd_get_supervision_timeout (void)
 Get Supervision Timeout. More...
 
uint16_t wiced_blehidd_get_connection_handle (void)
 Get Connection Handle, which is returned by controller in the LE connection complete event. More...
 
void wiced_blehidd_register_report_table (wiced_blehidd_report_gatt_characteristic_t *table, uint32_t num)
 register HID report table for sending and receiving More...
 
wiced_bt_gatt_status_t wiced_blehidd_send_report (uint16_t gatts_conn_id, uint8_t reportID, wiced_hidd_report_type_t reportType, uint8_t *data, uint8_t length)
 send HID report as GATT notification More...
 
wiced_bt_gatt_status_t wiced_blehidd_write_handler (void *data)
 Handle GATT write cmd/req for HID reports. More...
 
uint16_t wiced_blehidd_get_att_mtu_size (BD_ADDR bda)
 
void wiced_blehidd_allow_peripheral_latency (wiced_bool_t allow)
 Allow applications to disable peripheral latency. More...
 
void wiced_blehidd_set_asym_peripheral_latency (uint16_t connHandle, uint16_t latency)
 Allow applications to set asymmetric peripheral latency in peripheral side. More...
 
wiced_bool_t wiced_blehidd_is_wakeup_from_conn_req (void)
 Check if wake up from ShutDown Sleep is due to receiving LE connect request. More...
 
void wiced_bthidd_setDefaultLinkSupervisionTimeout (UINT16 slots)
 set the default Link Supervision Timeout value More...
 

Detailed Description

AIROC BLEHIDD COMMON APIs for Human Interface Device Profile (HID) Device over LE.

This file provides definitions of the interfaces for AIROC BLEHIDD Application development.

Enumeration Type Documentation

anonymous enum

BR/EDR link power state/mode.

Enumerator
POWER_MODE_HIGH 

Max power requested.

POWER_MODE_LOW 

power in between

POWER_MODE_IDLE 

Power mode idle.

POWER_MODE_BFC_SUSPEND 

Link suspend requested.

POWER_MODE_DISCONNECT 

Link disconnect requested.

anonymous enum

Sniff type.

Enumerator
SNIFF_NORMAL 

Normal sniff to be negotiated with host/peer.

SNIFF_ASYMMETRIC 

Asymmetric sniff.