projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Re-enable cppcheck static analysis unused function checks after adding in special...
[pub/USBasp.git]
/
Demos
/
Device
/
ClassDriver
/
RNDISEthernet
/
RNDISEthernet.c
diff --git
a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
index
dc9682a
..
2a8ba97
100644
(file)
--- a/
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
+++ b/
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
1
.
+ Copyright (C) Dean Camera, 201
2
.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 201
1
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
2
Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-63,7
+63,10
@@
USB_ClassInfo_RNDIS_Device_t Ethernet_RNDIS_Interface =
},
};
},
};
+/** Global to store the incoming frame from the host before it is processed by the device. */
static Ethernet_Frame_Info_t FrameIN;
static Ethernet_Frame_Info_t FrameIN;
+
+/** Global to store the outgoing frame created in the device before it is sent to the host. */
static Ethernet_Frame_Info_t FrameOUT;
/** Main program entry point. This routine contains the overall program flow, including initial
static Ethernet_Frame_Info_t FrameOUT;
/** Main program entry point. This routine contains the overall program flow, including initial
@@
-84,16
+87,16
@@
int main(void)
if (RNDIS_Device_IsPacketReceived(&Ethernet_RNDIS_Interface))
{
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
if (RNDIS_Device_IsPacketReceived(&Ethernet_RNDIS_Interface))
{
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
-
+
RNDIS_Device_ReadPacket(&Ethernet_RNDIS_Interface, &FrameIN.FrameData, &FrameIN.FrameLength);
Ethernet_ProcessPacket(&FrameIN, &FrameOUT);
RNDIS_Device_ReadPacket(&Ethernet_RNDIS_Interface, &FrameIN.FrameData, &FrameIN.FrameLength);
Ethernet_ProcessPacket(&FrameIN, &FrameOUT);
-
+
if (FrameOUT.FrameLength)
{
if (FrameOUT.FrameLength)
{
- RNDIS_Device_SendPacket(&Ethernet_RNDIS_Interface, &FrameOUT.FrameData, FrameOUT.FrameLength);
+ RNDIS_Device_SendPacket(&Ethernet_RNDIS_Interface, &FrameOUT.FrameData, FrameOUT.FrameLength);
FrameOUT.FrameLength = 0;
}
FrameOUT.FrameLength = 0;
}
-
+
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}