MDK-ARM Keil, MDK-ARM Datasheet - Page 132

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
132
The button data is held in a single byte, InReport. This variable is updated by the
GetInReport() function, is a user function placed in
must update the InReport variable, which is defined in the
example, the InReport consists of a single byte, which holds the current switch
values.
if ((FIO2PIN & PBINT) == 0)
}
else
}
Data packets sent out from the USB host are handled by a similar mechanism.
Data sent out from the host is sent on Endpoint 0. This Endpoint is normally
reserved for control information, so, by default, the OUT data is transferred in
set_report control sequences. The Endpoint 0 handler receives the set_report
sequence. This triggers the HID_set_report() function in the
which reads the data and places it into the variable OutReport.
BOOL HID_SetReport (void)
}
Like the GetInReport() function, SetOutReport() is stored in
contain the necessary code to pass the new data to your application.
void SetOutReport (void)
}
Exercise: HID project
This project uses the HID class driver to exchange single bytes of data with a
PC.
InReport = 0x01;
InReport = 0x00;
switch (SetupPacket.wValue.WB.H)
}
case HID_REPORT_OUTPUT:
break;
FIO2SET = OutReport;
{
OutReport = EP0Buf [0];
SetOutReport ();
{
{
{
{
// Check if PBINT is pressed
main.c
Chapter 5. RL-USB Introduction
. Your application
main.c
demo.c
hiduser.c
module. In this
and must
module,

Related parts for MDK-ARM