All comments in the library, bootloaders, demos and projects have now been spell...
[pub/lufa.git] / Demos / Device / RNDISEthernet / TCP.c
index b4a6534..f259aad 100644 (file)
@@ -60,7 +60,7 @@ TASK(TCP_Task)
 {\r
        /* Task to hand off TCP packets to and from the listening applications. */\r
 \r
-       /* Run each application in sequence, to process incomming and generate outgoing packets */\r
+       /* Run each application in sequence, to process incoming and generate outgoing packets */\r
        for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)\r
        {\r
                /* Find the corresponding port entry in the port table */\r
@@ -179,7 +179,7 @@ void TCP_Init(void)
  */\r
 bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*))\r
 {\r
-       /* Note, Port number should be specified in BIG endian to simplfy network code */\r
+       /* Note, Port number should be specified in BIG endian to simplify network code */\r
 \r
        /* Check to see if the port entry is already in the port state table */\r
        for (uint8_t PTableEntry = 0; PTableEntry < MAX_TCP_CONNECTIONS; PTableEntry++)\r
@@ -226,7 +226,7 @@ bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_Connecti
  */\r
 uint8_t TCP_GetPortState(uint16_t Port)\r
 {\r
-       /* Note, Port number should be specified in BIG endian to simplfy network code */\r
+       /* Note, Port number should be specified in BIG endian to simplify network code */\r
 \r
        for (uint8_t PTableEntry = 0; PTableEntry < MAX_TCP_CONNECTIONS; PTableEntry++)\r
        {\r
@@ -251,7 +251,7 @@ uint8_t TCP_GetPortState(uint16_t Port)
  */\r
 bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort, uint8_t State)\r
 {\r
-       /* Note, Port number should be specified in BIG endian to simplfy network code */\r
+       /* Note, Port number should be specified in BIG endian to simplify network code */\r
 \r
        for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)\r
        {\r
@@ -291,7 +291,7 @@ bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t
  */\r
 uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort)\r
 {\r
-       /* Note, Port number should be specified in BIG endian to simplfy network code */\r
+       /* Note, Port number should be specified in BIG endian to simplify network code */\r
 \r
        for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)\r
        {\r
@@ -318,7 +318,7 @@ uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16
  */\r
 TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort)\r
 {\r
-       /* Note, Port number should be specified in BIG endian to simplfy network code */\r
+       /* Note, Port number should be specified in BIG endian to simplify network code */\r
 \r
        for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)\r
        {\r
@@ -337,8 +337,8 @@ TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAd
 /** Processes a TCP packet inside an Ethernet frame, and writes the appropriate response\r
  *  to the output Ethernet frame if one is created by a application handler.\r
  *\r
- *  \param IPHeaderInStart    Pointer to the start of the incomming packet's IP header\r
- *  \param TCPHeaderInStart   Pointer to the start of the incomming packet's TCP header\r
+ *  \param IPHeaderInStart    Pointer to the start of the incoming packet's IP header\r
+ *  \param TCPHeaderInStart   Pointer to the start of the incoming packet's TCP header\r
  *  \param TCPHeaderOutStart  Pointer to the start of the outgoing packet's TCP header\r
  *\r
  *  \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE if no\r
@@ -357,7 +357,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void
 \r
        bool PacketResponse = false;\r
                \r
-       /* Check if the destination port is open and allows incomming connections */\r
+       /* Check if the destination port is open and allows incoming connections */\r
        if (TCP_GetPortState(TCPHeaderIN->DestinationPort) == TCP_Port_Open)\r
        {\r
                /* Detect SYN from host to start a connection */\r
@@ -375,7 +375,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void
                }\r
                else\r
                {\r
-                       /* Process the incomming TCP packet based on the current connection state for the sender and port */\r
+                       /* Process the incoming TCP packet based on the current connection state for the sender and port */\r
                        switch (TCP_GetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort))\r
                        {\r
                                case TCP_Connection_Listen:\r
@@ -470,7 +470,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void
                                                }\r
                                                else\r
                                                {\r
-                                                       /* Buffer is currently in use by the application, defer processing of the incomming packet */\r
+                                                       /* Buffer is currently in use by the application, defer processing of the incoming packet */\r
                                                        return NO_PROCESS;\r
                                                }\r
                                        }\r
@@ -591,7 +591,7 @@ static uint16_t TCP_Checksum16(void* TCPHeaderOutStart, IP_Address_t SourceAddre
 {\r
        uint32_t Checksum = 0;\r
        \r
-       /* TCP/IP checksums are the addition of the one's compliment of each word including the IP psudo-header,\r
+       /* TCP/IP checksums are the addition of the one's compliment of each word including the IP pseudo-header,\r
           complimented */\r
        \r
        Checksum += ((uint16_t*)&SourceAddress)[0];\r