USB device standard requests decoding


Definiciones

#define ATTACHED   0
#define POWERED   1
#define DEFAULT   2
#define ADDRESSED   3
#define CONFIGURED   4
#define SUSPENDED   5
#define USB_REMOTE_WAKEUP   1
#define OTG_B_HNP_ENABLE   3
#define OTG_A_HNP_SUPPORT   4
#define OTG_A_ALT_HNP_SUPPORT   5
#define Is_device_enumerated()   ((usb_configuration_nb!=0) ? TRUE : FALSE)
#define Is_device_not_enumerated()   ((usb_configuration_nb!=0) ? FALSE : TRUE)

Funciones

void usb_process_request (void)
void usb_generate_remote_wakeup (void)

Variables

U8 usb_configuration_nb

Documentación de las definiciones

#define ADDRESSED   3

#define ATTACHED   0

#define CONFIGURED   4

#define DEFAULT   2

 
#define Is_device_enumerated (  )     ((usb_configuration_nb!=0) ? TRUE : FALSE)

Returns true when device connected and correctly enumerated with an host. The device high level application should tests this before performing any applicative requests.

 
#define Is_device_not_enumerated (  )     ((usb_configuration_nb!=0) ? FALSE : TRUE)

#define OTG_A_ALT_HNP_SUPPORT   5

#define OTG_A_HNP_SUPPORT   4

#define OTG_B_HNP_ENABLE   3

#define POWERED   1

#define SUSPENDED   5

#define USB_REMOTE_WAKEUP   1


Documentación de las funciones

void usb_generate_remote_wakeup ( void   ) 

This function manages the remote wakeup generation to wake up the host controlle.

If the received request is not supported or a none USB standard request, the function will call for custom decoding function in usb_specific_request module.

Parámetros:
none 
Devuelve:
none
This function manages the remote wake up generation

void usb_process_request ( void   ) 

This function reads the SETUP request sent to the default control endpoint and calls the appropriate function. When exiting of the usb_read_request function, the device is ready to manage the next request.

If the received request is not supported or a none USB standard request, the function will call for custom decoding function in usb_specific_request module.

Parámetros:
none 
Devuelve:
none
Nota:
list of supported requests: SETUP_GET_DESCRIPTOR SETUP_GET_CONFIGURATION SETUP_SET_ADDRESS SETUP_SET_CONFIGURATION SETUP_CLEAR_FEATURE SETUP_SET_FEATURE SETUP_GET_STATUS


Documentación de las variables


Generado el Sun Jun 21 23:52:38 2009 para CursorControl por  doxygen 1.5.9