Cleanups to RNDIS device demos. Fix issue in RNDIS demos where the memory would become corrupted due to an incorrect bounds check when iterating over the port state table, causing random resets.
Revert change to Template_Endpoint_Control_R.c, which broke control stream reads. Remove uneeded ADC.h include in the class driver AudioOutput demo.
This commit is contained in:
parent
85c2716f2d
commit
d423090b26
16 changed files with 75 additions and 70 deletions
|
@ -55,12 +55,13 @@ int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart, void* UDPHeaderInStart, void
|
|||
|
||||
DecodeUDPHeader(UDPHeaderInStart);
|
||||
|
||||
/* Check to see if the UDP packet is a DHCP packet */
|
||||
if (SwapEndian_16(UDPHeaderIN->DestinationPort) == UDP_PORT_DHCP_REQUEST)
|
||||
switch (SwapEndian_16(UDPHeaderIN->DestinationPort))
|
||||
{
|
||||
RetSize = DHCP_ProcessDHCPPacket(IPHeaderInStart,
|
||||
&((uint8_t*)UDPHeaderInStart)[sizeof(UDP_Header_t)],
|
||||
&((uint8_t*)UDPHeaderOutStart)[sizeof(UDP_Header_t)]);
|
||||
case UDP_PORT_DHCP_REQUEST:
|
||||
RetSize = DHCP_ProcessDHCPPacket(IPHeaderInStart,
|
||||
&((uint8_t*)UDPHeaderInStart)[sizeof(UDP_Header_t)],
|
||||
&((uint8_t*)UDPHeaderOutStart)[sizeof(UDP_Header_t)]);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check to see if the protocol processing routine has filled out a response */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue