Fixed possible invalid program execution when in host mode if corrupt descriptor lengths are supplied by the attached device.

Minor code cleanups to add const and reformat where missing, as well as abstract out the internal device signature start address into a macro, so that it can be altered to suit particular devices within a single architecture if needed.

Add missing documentation to the USB_Device_States_t enum.
This commit is contained in:
Dean Camera 2011-05-14 02:17:58 +00:00
parent 78e58b6d1c
commit 049e930963
11 changed files with 67 additions and 28 deletions

View file

@ -90,7 +90,7 @@ uint8_t ProcessConfigurationDescriptor(void)
/* If the endpoint is a IN type endpoint */
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
DataINEndpoint = EndpointData;
DataINEndpoint = EndpointData;
else
DataOUTEndpoint = EndpointData;
}