2.1 Hardware Abstraction Layer (HAL)

The HAL manages the USB peripheral state. It provides the core layer with USB events and structured data access methods to the USB. The HAL is accessed exclusively by the core layer in the USB Device Stack architecture.

It provides functions to:
  • Enable and disable the USB hardware
  • Enable, disable and stall endpoints
  • Handle endpoint transactions
  • Attach or detach the device
  • Control resume signaling