| Electronic Components Datasheet Search |
|
UM0463 Datasheet(PDF) 16 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0463 Datasheet(HTML) 16 Page - STMicroelectronics |
|
16 / 30 page ![]() The USB state machine of the control endpoint UM0463 16/30 Recipient of endpoint The library does not support the Halt feature for the endpoint 0. In the configured state, the library checks if status register of the specified endpoint is not set as DISABLE (see Section 1.2.1). Then the endpoint is set to STALL status (Set Feature) or is set to NAK status if it was in the STALL status (Clear Feature.) After the status of the endpoint is changed correctly, the user code implemented callback function USER_USB_Clear_Feature_EP() is called for the Clear Feature request and the USER_USB_Set_Feature_EP() is called for the Set Feature request. In USER_USB_Clear_Feature_EP(), the user code knows that a STALL condition is cleared for certain endpoint and it is up to the user code to set the endpoint to ACK or stay in NAK status. In USER_USB_Set_Feature_EP(), the user code knows that a STALL condition is set for certain endpoint so that the state machine of that endpoint can be paused or stopped. 3.5.4 Set address The library checks the parameters of the request and set the device to the new address if the request is valid. There is no user code callback for this request. 3.5.5 Get descriptor A structure is defined for the user code to pass the descriptors to the library. typedef struct OneDescriptor { char *Descriptor; unsigned short Size; } ONE_DESCRIPTOR; The field Descriptor is the pointer that points to the descriptor and the field Size gives the length of the descriptor. An Application Descriptor table (Appli_Desc_Tab) is defined in the user area to keep track of descriptors. The number of string descriptors in the table has to be configured by the user through NUM_APP_STR_DESC macro (descriptor.h file) and the descriptor table has to be changed accordingly. This descriptor table is accessed through a pointer variable (DescTabPtr) which is present at a fixed location in the RAM. The user has to pass the address of the table to this pointer (DescTabPtr) in his main (App_main) function. The rest will be taken care of by the library. For StringDescriptors, the 3rd descriptor in the descriptor table must list all the language ID supported. The remaining string descriptors will follow language ID descriptor in the descriptor table. Limitation: The library supports the language ID of US English (0x0409) only, so the element 0 of StringDescriptor should list one language ID of US English only. Constant descriptors A descriptor is constant if the descriptor is stored in a single continued data buffer when it is going to be sent to the host. With the constant descriptors, the application initializes the Descriptor table pointer with the table address. The library will send the constant descriptors when they are required. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |