Commit 6933f2e1 authored by Dean Camera's avatar Dean Camera
Browse files

All comments in the library, bootloaders, demos and projects have now been...

All comments in the library, bootloaders, demos and projects have now been spell-checked and spelling mistakes/typos corrected.
parent fb3fcb96
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
*/ */
/* Protocol decoders for Ethernet, TCP, IP, ICMP and ARP. Each of these routines /* Protocol decoders for Ethernet, TCP, IP, ICMP and ARP. Each of these routines
accepts a header to the appropriate protocol and prints out pertient information accepts a header to the appropriate protocol and prints out pertinent information
on the packet through the serial port. on the packet through the serial port.
To disable printing of a specific protocol, define the token NO_DECODE_{Protocol} To disable printing of a specific protocol, define the token NO_DECODE_{Protocol}
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
/** \file /** \file
* *
* Protocol decoding routines, for the plain-text decoding of Ethernet frames for debugging purposes. * Protocol decoding routines, for the plain-text decoding of Ethernet frames for debugging purposes.
* Enabled protocol decoders will print incomming Ethernet frame contents through the USART in a human * Enabled protocol decoders will print incoming Ethernet frame contents through the USART in a human
* readable format. * readable format.
* *
* Note that the USART is a slow transmission medium, and will slow down packet processing considerably. * Note that the USART is a slow transmission medium, and will slow down packet processing considerably.
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "Ethernet.h" #include "Ethernet.h"
/* Macros: */ /* Macros: */
/** Physical MAC Address of the USB netowork adapter */ /** Physical MAC Address of the USB network adapter */
#define ADAPTER_MAC_ADDRESS {0x02, 0x00, 0x02, 0x00, 0x02, 0x00} #define ADAPTER_MAC_ADDRESS {0x02, 0x00, 0x02, 0x00, 0x02, 0x00}
/** Implemented RNDIS Version Major */ /** Implemented RNDIS Version Major */
......
...@@ -99,7 +99,7 @@ EVENT_HANDLER(USB_Connect) ...@@ -99,7 +99,7 @@ EVENT_HANDLER(USB_Connect)
} }
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via /** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs and stops all the relevent tasks. * the status LEDs and stops all the relevant tasks.
*/ */
EVENT_HANDLER(USB_Disconnect) EVENT_HANDLER(USB_Disconnect)
{ {
...@@ -114,7 +114,7 @@ EVENT_HANDLER(USB_Disconnect) ...@@ -114,7 +114,7 @@ EVENT_HANDLER(USB_Disconnect)
} }
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration /** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
* of the USB device after enumeration, and configures the RNDIS device endpoints and starts the relevent tasks. * of the USB device after enumeration, and configures the RNDIS device endpoints and starts the relevant tasks.
*/ */
EVENT_HANDLER(USB_ConfigurationChanged) EVENT_HANDLER(USB_ConfigurationChanged)
{ {
...@@ -238,7 +238,7 @@ void UpdateStatus(uint8_t CurrentStatus) ...@@ -238,7 +238,7 @@ void UpdateStatus(uint8_t CurrentStatus)
} }
/** Task to manage the sending and receiving of encapsulated RNDIS data and notifications. This removes the RNDIS /** Task to manage the sending and receiving of encapsulated RNDIS data and notifications. This removes the RNDIS
* wrapper from recieved Ethernet frames and places them in the FrameIN global buffer, or adds the RNDIS wrapper * wrapper from received Ethernet frames and places them in the FrameIN global buffer, or adds the RNDIS wrapper
* to a frame in the FrameOUT global before sending the buffer contents to the host. * to a frame in the FrameOUT global before sending the buffer contents to the host.
*/ */
TASK(RNDIS_Task) TASK(RNDIS_Task)
......
...@@ -60,7 +60,7 @@ TASK(TCP_Task) ...@@ -60,7 +60,7 @@ TASK(TCP_Task)
{ {
/* Task to hand off TCP packets to and from the listening applications. */ /* Task to hand off TCP packets to and from the listening applications. */
/* Run each application in sequence, to process incomming and generate outgoing packets */ /* Run each application in sequence, to process incoming and generate outgoing packets */
for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++) for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)
{ {
/* Find the corresponding port entry in the port table */ /* Find the corresponding port entry in the port table */
...@@ -179,7 +179,7 @@ void TCP_Init(void) ...@@ -179,7 +179,7 @@ void TCP_Init(void)
*/ */
bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*)) bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*))
{ {
/* Note, Port number should be specified in BIG endian to simplfy network code */ /* Note, Port number should be specified in BIG endian to simplify network code */
/* Check to see if the port entry is already in the port state table */ /* Check to see if the port entry is already in the port state table */
for (uint8_t PTableEntry = 0; PTableEntry < MAX_TCP_CONNECTIONS; PTableEntry++) for (uint8_t PTableEntry = 0; PTableEntry < MAX_TCP_CONNECTIONS; PTableEntry++)
...@@ -226,7 +226,7 @@ bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_Connecti ...@@ -226,7 +226,7 @@ bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_Connecti
*/ */
uint8_t TCP_GetPortState(uint16_t Port) uint8_t TCP_GetPortState(uint16_t Port)
{ {
/* Note, Port number should be specified in BIG endian to simplfy network code */ /* Note, Port number should be specified in BIG endian to simplify network code */
for (uint8_t PTableEntry = 0; PTableEntry < MAX_TCP_CONNECTIONS; PTableEntry++) for (uint8_t PTableEntry = 0; PTableEntry < MAX_TCP_CONNECTIONS; PTableEntry++)
{ {
...@@ -251,7 +251,7 @@ uint8_t TCP_GetPortState(uint16_t Port) ...@@ -251,7 +251,7 @@ uint8_t TCP_GetPortState(uint16_t Port)
*/ */
bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort, uint8_t State) bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort, uint8_t State)
{ {
/* Note, Port number should be specified in BIG endian to simplfy network code */ /* Note, Port number should be specified in BIG endian to simplify network code */
for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++) for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)
{ {
...@@ -291,7 +291,7 @@ bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t ...@@ -291,7 +291,7 @@ bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t
*/ */
uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort) uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort)
{ {
/* Note, Port number should be specified in BIG endian to simplfy network code */ /* Note, Port number should be specified in BIG endian to simplify network code */
for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++) for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)
{ {
...@@ -318,7 +318,7 @@ uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16 ...@@ -318,7 +318,7 @@ uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16
*/ */
TCP_ConnectionInfo_t* TCP_GetConnectionInfo(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)
{ {
/* Note, Port number should be specified in BIG endian to simplfy network code */ /* Note, Port number should be specified in BIG endian to simplify network code */
for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++) for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)
{ {
...@@ -337,8 +337,8 @@ TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAd ...@@ -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 /** Processes a TCP packet inside an Ethernet frame, and writes the appropriate response
* to the output Ethernet frame if one is created by a application handler. * to the output Ethernet frame if one is created by a application handler.
* *
* \param IPHeaderInStart Pointer to the start of the incomming packet's IP header * \param IPHeaderInStart Pointer to the start of the incoming packet's IP header
* \param TCPHeaderInStart Pointer to the start of the incomming packet's TCP header * \param TCPHeaderInStart Pointer to the start of the incoming packet's TCP header
* \param TCPHeaderOutStart Pointer to the start of the outgoing packet's TCP header * \param TCPHeaderOutStart Pointer to the start of the outgoing packet's TCP header
* *
* \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE if no * \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE if no
...@@ -357,7 +357,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void ...@@ -357,7 +357,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void
bool PacketResponse = false; bool PacketResponse = false;
/* Check if the destination port is open and allows incomming connections */ /* Check if the destination port is open and allows incoming connections */
if (TCP_GetPortState(TCPHeaderIN->DestinationPort) == TCP_Port_Open) if (TCP_GetPortState(TCPHeaderIN->DestinationPort) == TCP_Port_Open)
{ {
/* Detect SYN from host to start a connection */ /* Detect SYN from host to start a connection */
...@@ -375,7 +375,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void ...@@ -375,7 +375,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void
} }
else else
{ {
/* Process the incomming TCP packet based on the current connection state for the sender and port */ /* Process the incoming TCP packet based on the current connection state for the sender and port */
switch (TCP_GetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort)) switch (TCP_GetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort))
{ {
case TCP_Connection_Listen: case TCP_Connection_Listen:
...@@ -470,7 +470,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void ...@@ -470,7 +470,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void
} }
else else
{ {
/* Buffer is currently in use by the application, defer processing of the incomming packet */ /* Buffer is currently in use by the application, defer processing of the incoming packet */
return NO_PROCESS; return NO_PROCESS;
} }
} }
...@@ -591,7 +591,7 @@ static uint16_t TCP_Checksum16(void* TCPHeaderOutStart, IP_Address_t SourceAddre ...@@ -591,7 +591,7 @@ static uint16_t TCP_Checksum16(void* TCPHeaderOutStart, IP_Address_t SourceAddre
{ {
uint32_t Checksum = 0; uint32_t Checksum = 0;
/* TCP/IP checksums are the addition of the one's compliment of each word including the IP psudo-header, /* TCP/IP checksums are the addition of the one's compliment of each word including the IP pseudo-header,
complimented */ complimented */
Checksum += ((uint16_t*)&SourceAddress)[0]; Checksum += ((uint16_t*)&SourceAddress)[0];
......
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
unsigned char Reserved : 4; /**< Reserved, must be all 0 */ unsigned char Reserved : 4; /**< Reserved, must be all 0 */
unsigned char DataOffset : 4; /**< Offset of the data from the start of the header, in 4 byte chunks */ unsigned char DataOffset : 4; /**< Offset of the data from the start of the header, in 4 byte chunks */
uint8_t Flags; /**< TCP packet flags */ uint8_t Flags; /**< TCP packet flags */
uint16_t WindowSize; /**< Current data window size (bytes remaning in reception buffer) */ uint16_t WindowSize; /**< Current data window size (bytes remaining in reception buffer) */
uint16_t Checksum; /**< TCP checksum */ uint16_t Checksum; /**< TCP checksum */
uint16_t UrgentPointer; /**< Urgent data pointer */ uint16_t UrgentPointer; /**< Urgent data pointer */
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
/** Processes a UDP packet inside an Ethernet frame, and writes the appropriate response /** Processes a UDP packet inside an Ethernet frame, and writes the appropriate response
* to the output Ethernet frame if a subprotocol handler has created a response packet. * to the output Ethernet frame if a subprotocol handler has created a response packet.
* *
* \param IPHeaderInStart Pointer to the start of the incomming packet's IP header * \param IPHeaderInStart Pointer to the start of the incoming packet's IP header
* \param UDPHeaderInStart Pointer to the start of the incomming packet's UDP header * \param UDPHeaderInStart Pointer to the start of the incoming packet's UDP header
* \param UDPHeaderOutStart Pointer to the start of the outgoing packet's UDP header * \param UDPHeaderOutStart Pointer to the start of the outgoing packet's UDP header
* *
* \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise * \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
......
...@@ -216,7 +216,7 @@ USB_Descriptor_String_t PROGMEM ProductString = ...@@ -216,7 +216,7 @@ USB_Descriptor_String_t PROGMEM ProductString =
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h /** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
* documentation) by the application code so that the address and size of a requested descriptor can be given * documentation) by the application code so that the address and size of a requested descriptor can be given
* to the USB library. When the device recieves a Get Descriptor request on the control endpoint, this function * to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function
* is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
* USB host. * USB host.
*/ */
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
*/ */
/* Buffer Configuration: */ /* Buffer Configuration: */
/* Buffer length - select static size of created ringbuffers: */ /* Buffer length - select static size of created ring buffers: */
#define BUFF_STATICSIZE 128 // Set to the static ringbuffer size for all ringbuffers (place size after define) #define BUFF_STATICSIZE 128 // Set to the static ring buffer size for all ring buffers (place size after define)
/* Volatile mode - uncomment to make buffers volatile, for use in ISRs, etc: */ /* Volatile mode - uncomment to make buffers volatile, for use in ISRs, etc: */
#define BUFF_VOLATILE // Uncomment to cause all ring buffers to become volatile (and atomic if multi-byte) in access #define BUFF_VOLATILE // Uncomment to cause all ring buffers to become volatile (and atomic if multi-byte) in access
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
// #define BUFF_DROPNEW // Uncomment to cause full ring buffers to drop the new character when full // #define BUFF_DROPNEW // Uncomment to cause full ring buffers to drop the new character when full
// #define BUFF_NODROPCHECK // Uncomment to ignore full ring buffer checks - checking left to user! // #define BUFF_NODROPCHECK // Uncomment to ignore full ring buffer checks - checking left to user!
/* Underflow behaviour - select behaviour when Buffer_GetElement is called with an empty ringbuffer: */ /* Underflow behaviour - select behaviour when Buffer_GetElement is called with an empty ring buffer: */
//#define BUFF_EMPTYRETURNSZERO // Uncomment to return 0 when an empty ringbuffer is read //#define BUFF_EMPTYRETURNSZERO // Uncomment to return 0 when an empty ring buffer is read
#define BUFF_NOEMPTYCHECK // Uncomment to disable checking of empty ringbuffers - checking left to user! #define BUFF_NOEMPTYCHECK // Uncomment to disable checking of empty ring buffers - checking left to user!
/* Buffer storage type - set the datatype for the stored data */ /* Buffer storage type - set the datatype for the stored data */
#define BUFF_DATATYPE uint8_t // Change to the data type that is going to be stored into the buffer #define BUFF_DATATYPE uint8_t // Change to the data type that is going to be stored into the buffer
......
...@@ -79,7 +79,7 @@ int main(void) ...@@ -79,7 +79,7 @@ int main(void)
LEDs_Init(); LEDs_Init();
ReconfigureUSART(); ReconfigureUSART();
/* Ringbuffer Initialization */ /* Ring buffer Initialization */
Buffer_Initialize(&Rx_Buffer); Buffer_Initialize(&Rx_Buffer);
Buffer_Initialize(&Tx_Buffer); Buffer_Initialize(&Tx_Buffer);
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
/* Includes: */ /* Includes: */
#include <avr/io.h> #include <avr/io.h>
#include <avr/wdt.h> #include <avr/wdt.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include <avr/power.h> #include <avr/power.h>
#include "Descriptors.h" #include "Descriptors.h"
...@@ -99,17 +99,17 @@ ...@@ -99,17 +99,17 @@
#define CONTROL_LINE_IN_RING (1 << 3) #define CONTROL_LINE_IN_RING (1 << 3)
/** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host, /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host,
* to indicate that a framing error has ocurred on the virtual serial port. * to indicate that a framing error has occurred on the virtual serial port.
*/ */
#define CONTROL_LINE_IN_FRAMEERROR (1 << 4) #define CONTROL_LINE_IN_FRAMEERROR (1 << 4)
/** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host, /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host,
* to indicate that a parity error has ocurred on the virtual serial port. * to indicate that a parity error has occurred on the virtual serial port.
*/ */
#define CONTROL_LINE_IN_PARITYERROR (1 << 5) #define CONTROL_LINE_IN_PARITYERROR (1 << 5)
/** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host, /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host,
* to indicate that a data overrun error has ocurred on the virtual serial port. * to indicate that a data overrun error has occurred on the virtual serial port.
*/ */
#define CONTROL_LINE_IN_OVERRUNERROR (1 << 6) #define CONTROL_LINE_IN_OVERRUNERROR (1 << 6)
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the
* CDCDevice_LineCodingParity_t enum * CDCDevice_LineCodingParity_t enum
*/ */
uint8_t DataBits; /**< Bits of data per charater of the virtual serial port */ uint8_t DataBits; /**< Bits of data per character of the virtual serial port */
} CDC_Line_Coding_t; } CDC_Line_Coding_t;
/** Type define for a CDC notification, sent to the host via the CDC notification endpoint to indicate a /** Type define for a CDC notification, sent to the host via the CDC notification endpoint to indicate a
......
...@@ -75,7 +75,7 @@ int main(void) ...@@ -75,7 +75,7 @@ int main(void)
/* Initialize USB Subsystem */ /* Initialize USB Subsystem */
USB_Init(); USB_Init();
/* Startup message */ /* Start-up message */
puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
"CDC Host Demo running.\r\n" ESC_INVERSE_OFF)); "CDC Host Demo running.\r\n" ESC_INVERSE_OFF));
...@@ -132,7 +132,7 @@ EVENT_HANDLER(USB_HostError) ...@@ -132,7 +132,7 @@ EVENT_HANDLER(USB_HostError)
for(;;); for(;;);
} }
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occured while /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device. * enumerating an attached USB device.
*/ */
EVENT_HANDLER(USB_DeviceEnumerationFailed) EVENT_HANDLER(USB_DeviceEnumerationFailed)
...@@ -196,7 +196,7 @@ TASK(USB_CDC_Host) ...@@ -196,7 +196,7 @@ TASK(USB_CDC_Host)
wLength: 0, wLength: 0,
}; };
/* Send the request, display error and wait for device detatch if request fails */ /* Send the request, display error and wait for device detach if request fails */
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful) if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
{ {
puts_P(PSTR("Control Error (Set Configuration).\r\n")); puts_P(PSTR("Control Error (Set Configuration).\r\n"));
...@@ -248,7 +248,7 @@ TASK(USB_CDC_Host) ...@@ -248,7 +248,7 @@ TASK(USB_CDC_Host)
uint16_t BufferLength = Pipe_BytesInPipe(); uint16_t BufferLength = Pipe_BytesInPipe();
uint8_t Buffer[BufferLength]; uint8_t Buffer[BufferLength];
/* Read in the pipe data to the tempoary buffer */ /* Read in the pipe data to the temporary buffer */
Pipe_Read_Stream_LE(Buffer, BufferLength); Pipe_Read_Stream_LE(Buffer, BufferLength);
/* Clear the pipe after it is read, ready for the next packet */ /* Clear the pipe after it is read, ready for the next packet */
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
DescriptorTooLarge = 2, /**< The device's Configuration Descriptor is too large to process */ DescriptorTooLarge = 2, /**< The device's Configuration Descriptor is too large to process */
InvalidConfigDataReturned = 3, /**< The device returned an invalid Configuration Descriptor */ InvalidConfigDataReturned = 3, /**< The device returned an invalid Configuration Descriptor */
NoCDCInterfaceFound = 4, /**< A compatible CDC interface was not found in the device's Configuration Descriptor */ NoCDCInterfaceFound = 4, /**< A compatible CDC interface was not found in the device's Configuration Descriptor */
NoEndpointFound = 5, /**< Cmpatible CDC endpoints were not found in the device's CDC interface */ NoEndpointFound = 5, /**< Compatible CDC endpoints were not found in the device's CDC interface */
}; };
/* Configuration Descriptor Comparison Functions: */ /* Configuration Descriptor Comparison Functions: */
......
...@@ -75,7 +75,7 @@ int main(void) ...@@ -75,7 +75,7 @@ int main(void)
/* Initialize USB Subsystem */ /* Initialize USB Subsystem */
USB_Init(); USB_Init();
/* Startup message */ /* Start-up message */
puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
"Generic HID Host Demo running.\r\n" ESC_INVERSE_OFF)); "Generic HID Host Demo running.\r\n" ESC_INVERSE_OFF));
...@@ -132,7 +132,7 @@ EVENT_HANDLER(USB_HostError) ...@@ -132,7 +132,7 @@ EVENT_HANDLER(USB_HostError)
for(;;); for(;;);
} }
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occured while /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device. * enumerating an attached USB device.
*/ */
EVENT_HANDLER(USB_DeviceEnumerationFailed) EVENT_HANDLER(USB_DeviceEnumerationFailed)
...@@ -288,7 +288,7 @@ TASK(USB_HID_Host) ...@@ -288,7 +288,7 @@ TASK(USB_HID_Host)
wLength: 0, wLength: 0,
}; };
/* Send the request, display error and wait for device detatch if request fails */ /* Send the request, display error and wait for device detach if request fails */
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful) if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
{ {
puts_P(PSTR("Control Error (Set Configuration).\r\n")); puts_P(PSTR("Control Error (Set Configuration).\r\n"));
......
...@@ -75,7 +75,7 @@ int main(void) ...@@ -75,7 +75,7 @@ int main(void)
/* Initialize USB Subsystem */ /* Initialize USB Subsystem */
USB_Init(); USB_Init();
/* Startup message */ /* Start-up message */
puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
"Keyboard Host Demo running.\r\n" ESC_INVERSE_OFF)); "Keyboard Host Demo running.\r\n" ESC_INVERSE_OFF));
...@@ -132,7 +132,7 @@ EVENT_HANDLER(USB_HostError) ...@@ -132,7 +132,7 @@ EVENT_HANDLER(USB_HostError)
for(;;); for(;;);
} }
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occured while /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device. * enumerating an attached USB device.
*/ */
EVENT_HANDLER(USB_DeviceEnumerationFailed) EVENT_HANDLER(USB_DeviceEnumerationFailed)
...@@ -263,7 +263,7 @@ TASK(USB_Keyboard_Host) ...@@ -263,7 +263,7 @@ TASK(USB_Keyboard_Host)
wLength: 0, wLength: 0,
}; };
/* Send the request, display error and wait for device detatch if request fails */ /* Send the request, display error and wait for device detach if request fails */
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful) if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
{ {
puts_P(PSTR("Control Error (Set Configuration).\r\n")); puts_P(PSTR("Control Error (Set Configuration).\r\n"));
...@@ -310,7 +310,7 @@ TASK(USB_Keyboard_Host) ...@@ -310,7 +310,7 @@ TASK(USB_Keyboard_Host)
wLength: 0, wLength: 0,
}; };
/* Send the request, display error and wait for device detatch if request fails */ /* Send the request, display error and wait for device detach if request fails */
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful) if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
{ {
puts_P(PSTR("Control Error (Set Protocol).\r\n")); puts_P(PSTR("Control Error (Set Protocol).\r\n"));
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
{ {
ParseSuccessful = 0, /**< HID report descriptor parsed successfully */ ParseSuccessful = 0, /**< HID report descriptor parsed successfully */
ParseError = 1, /**< Failed to fully process the HID report descriptor */ ParseError = 1, /**< Failed to fully process the HID report descriptor */
ParseControlError = 2, /**< Control error occured while trying to read the device HID descriptor */ ParseControlError = 2, /**< Control error occurred while trying to read the device HID descriptor */
}; };
/* Type Defines: */ /* Type Defines: */
......
...@@ -75,7 +75,7 @@ int main(void) ...@@ -75,7 +75,7 @@ int main(void)
/* Initialize USB Subsystem */ /* Initialize USB Subsystem */
USB_Init(); USB_Init();
/* Startup message */ /* Start-up message */
puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
"Keyboard Host Demo running.\r\n" ESC_INVERSE_OFF)); "Keyboard Host Demo running.\r\n" ESC_INVERSE_OFF));
...@@ -132,7 +132,7 @@ EVENT_HANDLER(USB_HostError) ...@@ -132,7 +132,7 @@ EVENT_HANDLER(USB_HostError)
for(;;); for(;;);
} }
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occured while /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device. * enumerating an attached USB device.
*/ */
EVENT_HANDLER(USB_DeviceEnumerationFailed) EVENT_HANDLER(USB_DeviceEnumerationFailed)
...@@ -199,7 +199,7 @@ TASK(USB_Keyboard_Host) ...@@ -199,7 +199,7 @@ TASK(USB_Keyboard_Host)
wLength: 0, wLength: 0,
}; };
/* Send the request, display error and wait for device detatch if request fails */ /* Send the request, display error and wait for device detach if request fails */
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful) if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
{ {
puts_P(PSTR("Control Error (Set Configuration).\r\n")); puts_P(PSTR("Control Error (Set Configuration).\r\n"));
...@@ -255,7 +255,7 @@ TASK(USB_Keyboard_Host) ...@@ -255,7 +255,7 @@ TASK(USB_Keyboard_Host)
break; break;
} }
/* All LEDs off - ready to indicate keypresses */ /* All LEDs off - ready to indicate key presses */
UpdateStatus(Status_USBReady); UpdateStatus(Status_USBReady);
puts_P(PSTR("Keyboard Enumerated.\r\n")); puts_P(PSTR("Keyboard Enumerated.\r\n"));
...@@ -282,7 +282,7 @@ TASK(USB_Keyboard_Host) ...@@ -282,7 +282,7 @@ TASK(USB_Keyboard_Host)
/* Check each HID report item in turn, looking for keyboard scan code reports */ /* Check each HID report item in turn, looking for keyboard scan code reports */
for (uint8_t ReportNumber = 0; ReportNumber < HIDReportInfo.TotalReportItems; ReportNumber++) for (uint8_t ReportNumber = 0; ReportNumber < HIDReportInfo.TotalReportItems