diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-07-11 09:50:54 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-07-11 09:50:54 +0000 |
| commit | 15efa067d3d03912bfe58b442b735e594acf9cf5 (patch) | |
| tree | 7a056c1f10c57743eb66aefc125e224b61660506 /Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c | |
| parent | 1b5c5f8c35becac201439e6cb3dc549f5206601a (diff) | |
More endianness porting of the LUFA device mode class drivers.
Add endianness information to the class driver and core structure definitions.
Move out the unused Ethernet_Frame_Info_t structure definition to the RNDIS device demos where it is needed.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1858 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c')
| -rw-r--r-- | Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c index de614956..2c8c398f 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c +++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c @@ -51,12 +51,12 @@ /** Decodes an Ethernet frame header and prints its contents to through the USART in a human readable format. * - * \param[in] FrameINData Pointer to the start of an Ethernet frame information structure + * \param[in] FrameINData Pointer to the start of an Ethernet frame data */ -void DecodeEthernetFrameHeader(Ethernet_Frame_Info_t* const FrameINData) +void DecodeEthernetFrameHeader(void* InDataStart) { #if !defined(NO_DECODE_ETHERNET) - Ethernet_Frame_Header_t* FrameHeader = (Ethernet_Frame_Header_t*)FrameINData->FrameData; + Ethernet_Frame_Header_t* FrameHeader = (Ethernet_Frame_Header_t*)InDataStart; printf_P(PSTR("\r\n")); @@ -84,10 +84,7 @@ void DecodeEthernetFrameHeader(Ethernet_Frame_Info_t* const FrameINData) FrameHeader->Destination.Octets[4], FrameHeader->Destination.Octets[5]); - if (SwapEndian_16(FrameINData->FrameLength) > ETHERNET_VER2_MINSIZE) - printf_P(PSTR(" + Protocol: 0x%04x\r\n"), SwapEndian_16(FrameHeader->EtherType)); - else - printf_P(PSTR(" + Protocol: UNKNOWN E1\r\n")); + printf_P(PSTR(" + Protocol: 0x%04x\r\n"), SwapEndian_16(FrameHeader->EtherType)); #endif } |
