aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/RNDISEthernet/Lib
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-07-21 16:19:32 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-07-21 16:19:32 +0000
commit6bda628718f67c04ed43e8328f55bdce5319c504 (patch)
treeefd08eefa90cef94440f880a70902f5803fb12a7 /Demos/Device/ClassDriver/RNDISEthernet/Lib
parent83e293a6ec98c7faad1b76dd312b31b86cbeecc1 (diff)
downloadlufa-6bda628718f67c04ed43e8328f55bdce5319c504.tar.gz
lufa-6bda628718f67c04ed43e8328f55bdce5319c504.tar.bz2
lufa-6bda628718f67c04ed43e8328f55bdce5319c504.zip
Update all demos, projects and bootloaders to indent all function parameters, one per line, for better readability.
Add missing const qualifiers to the demos.
Diffstat (limited to 'Demos/Device/ClassDriver/RNDISEthernet/Lib')
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.c3
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.h3
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c4
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.h4
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.c6
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.h6
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c4
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.h4
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.c4
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.h4
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c2
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h2
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c31
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h31
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c4
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.h4
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.c6
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.h3
18 files changed, 88 insertions, 37 deletions
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.c
index 6cbc67f89..18da19cdb 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.c
@@ -46,7 +46,8 @@
*
* \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
*/
-int16_t ARP_ProcessARPPacket(void* InDataStart, void* OutDataStart)
+int16_t ARP_ProcessARPPacket(void* InDataStart,
+ void* OutDataStart)
{
DecodeARPHeader(InDataStart);
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.h
index 6ae9b7be3..8de76f3b6 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.h
@@ -69,6 +69,7 @@
} ARP_Header_t;
/* Function Prototypes: */
- int16_t ARP_ProcessARPPacket(void* InDataStart, void* OutDataStart);
+ int16_t ARP_ProcessARPPacket(void* InDataStart,
+ void* OutDataStart);
#endif
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
index 761c6adf1..f694f2c81 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
@@ -46,7 +46,9 @@
*
* \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
*/
-int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart, void* DHCPHeaderInStart, void* DHCPHeaderOutStart)
+int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart,
+ void* DHCPHeaderInStart,
+ void* DHCPHeaderOutStart)
{
IP_Header_t* IPHeaderIN = (IP_Header_t*)IPHeaderInStart;
DHCP_Header_t* DHCPHeaderIN = (DHCP_Header_t*)DHCPHeaderInStart;
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.h
index 2c8c4d884..3bfdb29be 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.h
@@ -120,6 +120,8 @@
} DHCP_Header_t;
/* Function Prototypes: */
- int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart, void* DHCPHeaderInStart, void* DHCPHeaderOutStart);
+ int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart,
+ void* DHCPHeaderInStart,
+ void* DHCPHeaderOutStart);
#endif
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.c
index e34f824e9..5f396234c 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.c
@@ -56,7 +56,8 @@ const IP_Address_t ClientIPAddress = {CLIENT_IP_ADDRESS};
/** Processes an incoming Ethernet frame, and writes the appropriate response to the output Ethernet
* frame buffer if the sub protocol handlers create a valid response.
*/
-void Ethernet_ProcessPacket(Ethernet_Frame_Info_t* FrameIN, Ethernet_Frame_Info_t* FrameOUT)
+void Ethernet_ProcessPacket(Ethernet_Frame_Info_t* const FrameIN,
+ Ethernet_Frame_Info_t* const FrameOUT)
{
DecodeEthernetFrameHeader(FrameIN);
@@ -115,7 +116,8 @@ void Ethernet_ProcessPacket(Ethernet_Frame_Info_t* FrameIN, Ethernet_Frame_Info_
*
* \return A 16-bit Ethernet checksum value
*/
-uint16_t Ethernet_Checksum16(void* Data, uint16_t Bytes)
+uint16_t Ethernet_Checksum16(void* Data,
+ uint16_t Bytes)
{
uint16_t* Words = (uint16_t*)Data;
uint32_t Checksum = 0;
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.h
index f8b8bffde..233f48d1b 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.h
@@ -96,7 +96,9 @@
extern const IP_Address_t ClientIPAddress;
/* Function Prototypes: */
- void Ethernet_ProcessPacket(Ethernet_Frame_Info_t* FrameIN, Ethernet_Frame_Info_t* FrameOUT);
- uint16_t Ethernet_Checksum16(void* Data, uint16_t Bytes);
+ void Ethernet_ProcessPacket(Ethernet_Frame_Info_t* const FrameIN,
+ Ethernet_Frame_Info_t* const FrameOUT);
+ uint16_t Ethernet_Checksum16(void* Data,
+ uint16_t Bytes);
#endif
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
index fa1a651e6..fec74b37b 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
@@ -46,7 +46,9 @@
*
* \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
*/
-int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* FrameIN, void* InDataStart, void* OutDataStart)
+int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* const FrameIN,
+ void* InDataStart,
+ void* OutDataStart)
{
ICMP_Header_t* ICMPHeaderIN = (ICMP_Header_t*)InDataStart;
ICMP_Header_t* ICMPHeaderOUT = (ICMP_Header_t*)OutDataStart;
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.h
index 4fe42957c..9982560b1 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.h
@@ -75,6 +75,8 @@
} ICMP_Header_t;
/* Function Prototypes: */
- int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* FrameIN, void* InDataStart, void* OutDataStart);
+ int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* const FrameIN,
+ void* InDataStart,
+ void* OutDataStart);
#endif
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.c
index 6766322ca..6f49eac88 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.c
@@ -47,7 +47,9 @@
* response was generated, NO_PROCESS if the packet processing was deferred until the
* next Ethernet packet handler iteration
*/
-int16_t IP_ProcessIPPacket(Ethernet_Frame_Info_t* FrameIN, void* InDataStart, void* OutDataStart)
+int16_t IP_ProcessIPPacket(Ethernet_Frame_Info_t* const FrameIN,
+ void* InDataStart,
+ void* OutDataStart)
{
DecodeIPHeader(InDataStart);
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.h
index ede537ace..215695756 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.h
@@ -90,6 +90,8 @@
} IP_Header_t;
/* Function Prototypes: */
- int16_t IP_ProcessIPPacket(Ethernet_Frame_Info_t* FrameIN, void* InDataStart, void* OutDataStart);
+ int16_t IP_ProcessIPPacket(Ethernet_Frame_Info_t* const FrameIN,
+ void* InDataStart,
+ void* OutDataStart);
#endif
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c
index e0bf6ecfe..676bf7a94 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c
@@ -53,7 +53,7 @@
*
* \param[in] FrameINData Pointer to the start of an Ethernet frame information structure
*/
-void DecodeEthernetFrameHeader(Ethernet_Frame_Info_t* FrameINData)
+void DecodeEthernetFrameHeader(Ethernet_Frame_Info_t* const FrameINData)
{
#if !defined(NO_DECODE_ETHERNET)
Ethernet_Frame_Header_t* FrameHeader = (Ethernet_Frame_Header_t*)FrameINData->FrameData;
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h
index 56ed795e6..c1d3b395d 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h
@@ -48,7 +48,7 @@
#include "Ethernet.h"
/* Function Prototypes: */
- void DecodeEthernetFrameHeader(Ethernet_Frame_Info_t* FrameINData);
+ void DecodeEthernetFrameHeader(Ethernet_Frame_Info_t* const FrameINData);
void DecodeARPHeader(void* InDataStart);
void DecodeIPHeader(void* InDataStart);
void DecodeICMPHeader(void* InDataStart);
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c
index 6b62edb13..e0c581f59 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c
@@ -55,7 +55,7 @@ TCP_ConnectionState_t ConnectionStateTable[MAX_TCP_CONNECTIONS];
* level. If an application produces a response, this task constructs the appropriate Ethernet frame and places it into the Ethernet OUT
* buffer for later transmission.
*/
-void TCP_TCPTask(USB_ClassInfo_RNDIS_Device_t* RNDISInterfaceInfo)
+void TCP_TCPTask(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo)
{
/* Run each application in sequence, to process incoming and generate outgoing packets */
for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)
@@ -178,7 +178,9 @@ void TCP_Init(void)
*
* \return Boolean true if the port state was set, false otherwise (no more space in the port state table)
*/
-bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*))
+bool TCP_SetPortState(const uint16_t Port,
+ const uint8_t State,
+ void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*))
{
/* Note, Port number should be specified in BIG endian to simplify network code */
@@ -225,7 +227,7 @@ bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_Connecti
*
* \return A value from the TCP_PortStates_t enum
*/
-uint8_t TCP_GetPortState(uint16_t Port)
+uint8_t TCP_GetPortState(const uint16_t Port)
{
/* Note, Port number should be specified in BIG endian to simplify network code */
@@ -250,7 +252,10 @@ uint8_t TCP_GetPortState(uint16_t Port)
*
* \return Boolean true if the connection was updated or created, false otherwise (no more space in the connection state table)
*/
-bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort, uint8_t State)
+bool TCP_SetConnectionState(const uint16_t Port,
+ const IP_Address_t RemoteAddress,
+ const uint16_t RemotePort,
+ const uint8_t State)
{
/* Note, Port number should be specified in BIG endian to simplify network code */
@@ -290,7 +295,9 @@ bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t
*
* \return A value from the TCP_ConnectionStates_t enum
*/
-uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort)
+uint8_t TCP_GetConnectionState(const uint16_t Port,
+ const IP_Address_t RemoteAddress,
+ const uint16_t RemotePort)
{
/* Note, Port number should be specified in BIG endian to simplify network code */
@@ -317,7 +324,9 @@ uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16
*
* \return ConnectionInfo structure of the connection if found, NULL otherwise
*/
-TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort)
+TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
+ const IP_Address_t RemoteAddress,
+ const uint16_t RemotePort)
{
/* Note, Port number should be specified in BIG endian to simplify network code */
@@ -346,7 +355,9 @@ TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAd
* response was generated, NO_PROCESS if the packet processing was deferred until the
* next Ethernet packet handler iteration
*/
-int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void* TCPHeaderOutStart)
+int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
+ void* TCPHeaderInStart,
+ void* TCPHeaderOutStart)
{
IP_Header_t* IPHeaderIN = (IP_Header_t*)IPHeaderInStart;
TCP_Header_t* TCPHeaderIN = (TCP_Header_t*)TCPHeaderInStart;
@@ -593,8 +604,10 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void
*
* \return A 16-bit TCP checksum value
*/
-static uint16_t TCP_Checksum16(void* TCPHeaderOutStart, IP_Address_t SourceAddress,
- IP_Address_t DestinationAddress, uint16_t TCPOutSize)
+static uint16_t TCP_Checksum16(void* TCPHeaderOutStart,
+ const IP_Address_t SourceAddress,
+ const IP_Address_t DestinationAddress,
+ const uint16_t TCPOutSize)
{
uint32_t Checksum = 0;
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h
index ac144150c..d412647eb 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h
@@ -228,18 +228,31 @@
} TCP_Header_t;
/* Function Prototypes: */
- void TCP_TCPTask(USB_ClassInfo_RNDIS_Device_t* RNDISInterfaceInfo);
+ void TCP_TCPTask(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo);
void TCP_Init(void);
- bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*));
- uint8_t TCP_GetPortState(uint16_t Port);
- bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort, uint8_t State);
- uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort);
- TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort);
- int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void* TCPHeaderOutStart);
+ bool TCP_SetPortState(const uint16_t Port,
+ const uint8_t State,
+ void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*));
+ uint8_t TCP_GetPortState(const uint16_t Port);
+ bool TCP_SetConnectionState(const uint16_t Port,
+ const IP_Address_t RemoteAddress,
+ const uint16_t RemotePort,
+ const uint8_t State);
+ uint8_t TCP_GetConnectionState(const uint16_t Port,
+ const IP_Address_t RemoteAddress,
+ const uint16_t RemotePort);
+ TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
+ const IP_Address_t RemoteAddress,
+ const uint16_t RemotePort);
+ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
+ void* TCPHeaderInStart,
+ void* TCPHeaderOutStart);
#if defined(INCLUDE_FROM_TCP_C)
- static uint16_t TCP_Checksum16(void* TCPHeaderOutStart, IP_Address_t SourceAddress,
- IP_Address_t DestinationAddress, uint16_t TCPOutSize);
+ static uint16_t TCP_Checksum16(void* TCPHeaderOutStart,
+ const IP_Address_t SourceAddress,
+ const IP_Address_t DestinationAddress,
+ uint16_t TCPOutSize);
#endif
#endif
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c
index c9c523f71..15b065656 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c
@@ -46,7 +46,9 @@
*
* \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
*/
-int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart, void* UDPHeaderInStart, void* UDPHeaderOutStart)
+int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart,
+ void* UDPHeaderInStart,
+ void* UDPHeaderOutStart)
{
UDP_Header_t* UDPHeaderIN = (UDP_Header_t*)UDPHeaderInStart;
UDP_Header_t* UDPHeaderOUT = (UDP_Header_t*)UDPHeaderOutStart;
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.h
index ee9052275..57abd0dc7 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.h
@@ -62,6 +62,8 @@
} UDP_Header_t;
/* Function Prototypes: */
- int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart, void* UDPHeaderInStart, void* UDPHeaderOutStart);
+ int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart,
+ void* UDPHeaderInStart,
+ void* UDPHeaderOutStart);
#endif
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.c
index 7f90de3b8..e01a04fb4 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.c
@@ -90,7 +90,8 @@ void Webserver_Init(void)
*
* \return Boolean true if the command matches the request, false otherwise
*/
-static bool IsHTTPCommand(uint8_t* RequestHeader, char* Command)
+static bool IsHTTPCommand(uint8_t* RequestHeader,
+ char* Command)
{
/* Returns true if the non null terminated string in RequestHeader matches the null terminated string Command */
return (strncmp((char*)RequestHeader, Command, strlen(Command)) == 0);
@@ -102,7 +103,8 @@ static bool IsHTTPCommand(uint8_t* RequestHeader, char* Command)
* \param[in] ConnectionState Pointer to a TCP Connection State structure giving connection information
* \param[in,out] Buffer Pointer to the application's send/receive packet buffer
*/
-void Webserver_ApplicationCallback(TCP_ConnectionState_t* ConnectionState, TCP_ConnectionBuffer_t* Buffer)
+void Webserver_ApplicationCallback(TCP_ConnectionState_t* const ConnectionState,
+ TCP_ConnectionBuffer_t* const Buffer)
{
char* BufferDataStr = (char*)Buffer->Data;
static uint8_t PageBlock = 0;
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.h
index 3ba4186ea..87fe1c91d 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.h
@@ -50,6 +50,7 @@
/* Function Prototypes: */
void Webserver_Init(void);
- void Webserver_ApplicationCallback(TCP_ConnectionState_t* ConnectionState, TCP_ConnectionBuffer_t* Buffer);
+ void Webserver_ApplicationCallback(TCP_ConnectionState_t* const ConnectionState,
+ TCP_ConnectionBuffer_t* const Buffer);
#endif