Atmel Software Framework

uhc.h File Reference

Interface of the USB Host Controller (UHC)

Copyright (C) 2011-2014 Atmel Corporation. All rights reserved.

#include "conf_usb_host.h"
#include "usb_protocol.h"
#include "uhd.h"

Data Structures

struct  uhc_device_t
 Structure to store device information. More...




enum  uhc_enum_status_t {
 Enumeration status Used in UHC_ENUM_EVENT() callback when a USB device enumeration is completed. More...


Functions to control the USB host stack
void uhc_start (void)
 Starts the host mode. More...
void uhc_stop (bool b_id_stop)
 Stops the host mode. More...
void uhc_suspend (bool b_remotewakeup)
 Suspends a USB line. More...
bool uhc_is_suspend (void)
 Test if the suspend state is enabled on the USB line. More...
void uhc_resume (void)
 Resumes the USB line. More...
User functions to manage a device
uint8_t uhc_get_device_number (void)
 Returns the number of connected devices. More...
char * uhc_dev_get_string_manufacturer (uhc_device_t *dev)
 Gets the USB string manufacturer from a USB device. More...
char * uhc_dev_get_string_product (uhc_device_t *dev)
 Gets the USB string product from a USB device. More...
char * uhc_dev_get_string_serial (uhc_device_t *dev)
 Gets the USB string serial from a USB device. More...
char * uhc_dev_get_string (uhc_device_t *dev, uint8_t str_id)
 Gets a USB string from a USB device. More...
uint16_t uhc_dev_get_power (uhc_device_t *dev)
 Gets the maximum consumption of a device (mA) More...
uhd_speed_t uhc_dev_get_speed (uhc_device_t *dev)
 Returns the current device speed. More...
bool uhc_dev_is_high_speed_support (uhc_device_t *dev)
 Tests if the device supports the USB high speed This function can wait the end of a setup request and the timing can be long (1ms to 5s). More...