MDK-ARM Keil, MDK-ARM Datasheet - Page 130

KIT REALVIEW MCU DEVELOPMENT

MDK-ARM

Manufacturer Part Number
MDK-ARM
Description
KIT REALVIEW MCU DEVELOPMENT
Manufacturer
Keil
Type
Compiler and IDEr
Datasheets

Specifications of MDK-ARM

For Use With/related Products
ARM MCUs
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
130
Here, we define a unique vendor profile. The HID Usage is an index pointing to
a subset within the usage page. Once the usage table has been defined, open the
collection of input and output items. Remember, everything in the USB protocol
is host-centric, so data goes IN to the host and OUT from the host to the device.
HID_Collection(HID_Application),
Here, we define a collection of application data. Other types of collections
include physical (raw data from a sensor) and logical data (different types of data
grouped in a defined format). Remember when writing the HID client to stay
consistent at both ends. Next, define the input data structure:
HID_Collection (HID_Application),
In the input item, take advantage of the usage pages to describe data as button
information. HID_ReportSize() defines the number of bits in each input item.
HID_ReportCount() defines the number of items in the report. In this case, we
are defining three bits. This also means that the logical minimum and maximum
will be zero and one. These values allow us to define a range of expected data
values for larger report sizes. The HID input tag defines these three bits as
variable data. The HID_absolute value means that the HID driver will not apply
any scaling values before it presents the data to the client. Next, define the
output item. Again, this is a single byte used to control eight LEDs.
At the beginning of the output item, define the usage page as LED data and
describe it as indicator LEDs. Next, define the item format. HID_ReportSize()
defines the number of bits in each field. HID_ReportCount() defines the number
of data fields. Again, logical minimum and maximum define the range of
allowed data values. Finally, define this as output HID data, which will vary
over time and no scaling is applied.
HID_LogicalMin (0),
HID_LogicalMaxS (0xFF),
HID_ReportSize (8),
HID_ReportCount (1),
HID_Usage (0x01),
HID_Input (HID_Data | HID_Variable | HID_Absolute),
HID_UsagePage (HID_USAGE_PAGE_LED),
HID_Usage (HID_USAGE_LED_GENERIC_INDICATOR),
HID_LogicalMin(0),
HID_LogicalMax(1),
HID_ReportCount(8),
HID_ReportSize(1),
HID_Output(HID_Data | HID_Variable | HID_Absolute),
// data range 0 – 255
// 8 bits or 1 byte per ‘item’
// one ‘item’ or one byte total sizes
Chapter 5. RL-USB Introduction

Related parts for MDK-ARM