SWRA715 December   2021 CC2642R , CC2652R

 

  1.   Trademarks
  2. 1Introduction
  3. 2Bluetooth Low Energy Introduction
  4. 3HOGP Introduction
    1. 3.1 HID Roles
    2. 3.2 HID Host
    3. 3.3 HID Device
  5. 4Project Description and Walkthrough
    1. 4.1  General Project Discussion
    2. 4.2  Report Map Discussion
    3. 4.3  Hid_input struct/union Discussion
    4. 4.4  Mouse Operation
    5. 4.5  Keyboard Operation
    6. 4.6  Consumer Report Operation
    7. 4.7  Connection Interval
    8. 4.8  Notification System
    9. 4.9  PDU Size and Number of PDUs per Connection Event
    10. 4.10 Notification Payload Discussion
      1. 4.10.1 Mouse Notification
      2. 4.10.2 Keyboard Notification
      3. 4.10.3 Consumer Report Notification
    11. 4.11 Throughput Discussion
    12. 4.12 Overall Block Diagrams
  6. 5Demo Usage
    1. 5.1 Hardware/Software Used
    2. 5.2 Mouse Demo Usage
    3. 5.3 Keyboard and Consumer Report Demo Usage
  7. 6Summary

Report Map Discussion

The hid_emu_kbd project relies on report maps. Report maps are a structure used by the HOGP to implement the HID over Bluetooth Low Energy functionality. Report maps are used to tell the HID Host what functionality and what kind of data to expect from the HID Device. In the original HID USB specification, report maps are called report descriptors. Report maps and report descriptors are identical. The only difference between them is that report maps are used in HOGP and report descriptors are used in HID USB.

The report map used by this project can be found in the hidkbdservice.c file and is contained within the hidReportMap variable. The report map in this project contains all of the input information for the keyboard, mouse, and consumer reports. The structure is divided into sections and the application as well as the HID Host is able to find the desired section through the use of the Report ID field. The report map can be easily modified to include different inputs or to modify the inputs that are already there. The USB Implementers Forum’s Device Working Group has a Report Descriptor builder tool that can be used to create report maps easily.

GUID-20210610-CA0I-Q6WP-LVHN-FL1MDZPFRHZZ-low.png Figure 4-1 The Mouse Section of the Report Map

Figure 4-1 shows a snippet of the report map structure. All fields are labeled and can easily be modified. For example, if a different amount of mouse buttons is desired, then the relevant fields can be easily updated.