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
|
@ -59,7 +59,7 @@ const IP_Address_t ClientIPAddress = {CLIENT_IP_ADDRESS};
|
|||
*/
|
||||
void Ethernet_ProcessPacket(Ethernet_Frame_Info_t* FrameIN, Ethernet_Frame_Info_t* FrameOUT)
|
||||
{
|
||||
DecodeEthernetFrameHeader(FrameIN->FrameData);
|
||||
DecodeEthernetFrameHeader(FrameIN);
|
||||
|
||||
/* Cast the incoming Ethernet frame to the Ethernet header type */
|
||||
Ethernet_Frame_Header_t* FrameINHeader = (Ethernet_Frame_Header_t*)&FrameIN->FrameData;
|
||||
|
@ -69,7 +69,8 @@ void Ethernet_ProcessPacket(Ethernet_Frame_Info_t* FrameIN, Ethernet_Frame_Info_
|
|||
|
||||
/* Ensure frame is addressed to either all (broadcast) or the virtual webserver, and is a type II frame */
|
||||
if ((MAC_COMPARE(&FrameINHeader->Destination, &ServerMACAddress) ||
|
||||
MAC_COMPARE(&FrameINHeader->Destination, &BroadcastMACAddress)))
|
||||
MAC_COMPARE(&FrameINHeader->Destination, &BroadcastMACAddress)) &&
|
||||
(SwapEndian_16(FrameIN->FrameLength) > ETHERNET_VER2_MINSIZE))
|
||||
{
|
||||
/* Process the packet depending on its protocol */
|
||||
switch (SwapEndian_16(FrameINHeader->EtherType))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue