Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ASF USB Device PHDC

Human interface on SAMD21-XPlain:

Introduction

This example shows how to implement a USB Device PHDC on Atmel MCU with USB module. This example uses a IEEE11073 stack skeleton which has the minimum to pass USB Command Verifier 2.0 Tool (CV2.0) tests from usb.org. Note: No USB driver is provided by Atmel for PHDC, but it is not required to execute CV2.0 PHDC tests.

Startup

You must compile, load and start example. After, you can start CV2.0 and execute Chapter 9 and PHDC tests.

  • LED0 blinks when USB host has checked and enabled PHDC interface
  • LED0 is on when PHDC has validated association
  • SW0 is used to send a measure

About example

The example uses the following module groups:

  • Basic modules: Startup, board, clock, interrupt, power management
  • USB Device stack and HID modules:
    services/usb/
    services/usb/udc/
    services/usb/class/phdc/device/
  • Specific implementation:
    • main.c,
      initializes clock
      initializes interrupt
      manages UI
    • ieee11073_skeleton.c, IEEE11073 stack skeleton
    • specific implementation for each target "./examples/product_board/":
      • conf_foo.h configuration of each module
      • ui.c implement of user's interface (buttons, leds)