Minor documentation page updates.
[pub/lufa.git] / Demos / Device / RNDISEthernet / RNDISEthernet.c
index 3246cd8..7c85719 100644 (file)
   this software.\r
 */\r
 \r
+/** \file\r
+ *\r
+ *  Main source file for the RNDISEthernet demo. This file contains the main tasks of\r
+ *  the demo and is responsible for the initial application hardware configuration.\r
+ */\r
+\r
 #include "RNDISEthernet.h"\r
 \r
+/** LUFA RNDIS Class driver interface configuration and state information. This structure is\r
+ *  passed to all RNDIS Class driver functions, so that multiple instances of the same class\r
+ *  within a device can be differentiated from one another.\r
+ */\r
 USB_ClassInfo_RNDIS_t Ethernet_RNDIS_Interface =\r
        {\r
                .ControlInterfaceNumber     = 0,\r
@@ -46,13 +56,19 @@ USB_ClassInfo_RNDIS_t Ethernet_RNDIS_Interface =
                .AdapterVendorDescription   = "LUFA RNDIS Demo Adapter",\r
                .AdapterMACAddress          = {ADAPTER_MAC_ADDRESS},\r
        };\r
-       \r
+\r
+/** Main program entry point. This routine contains the overall program flow, including initial\r
+ *  setup of all components and the main program loop.\r
+ */\r
 int main(void)\r
 {\r
        SetupHardware();\r
 \r
        LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
        \r
+       TCP_Init();\r
+       Webserver_Init();\r
+\r
        printf_P(PSTR("\r\n\r\n****** RNDIS Demo running. ******\r\n"));\r
 \r
        for (;;)\r
@@ -71,6 +87,7 @@ int main(void)
        }\r
 }\r
 \r
+/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
 void SetupHardware(void)\r
 {\r
        /* Disable watchdog if enabled by bootloader/fuses */\r
@@ -84,22 +101,21 @@ void SetupHardware(void)
        LEDs_Init();\r
        SerialStream_Init(9600, false);\r
        USB_Init();\r
-\r
-       /* Initialize TCP and Webserver modules */\r
-       TCP_Init();\r
-       Webserver_Init();\r
 }\r
 \r
+/** Event handler for the library USB Connection event. */\r
 void EVENT_USB_Connect(void)\r
 {\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+    LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
 }\r
 \r
+/** Event handler for the library USB Disconnection event. */\r
 void EVENT_USB_Disconnect(void)\r
 {\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+    LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
 }\r
 \r
+/** Event handler for the library USB Configuration Changed event. */\r
 void EVENT_USB_ConfigurationChanged(void)\r
 {\r
        LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
@@ -108,6 +124,7 @@ void EVENT_USB_ConfigurationChanged(void)
          LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
 }\r
 \r
+/** Event handler for the library USB Unhandled Control Packet event. */\r
 void EVENT_USB_UnhandledControlPacket(void)\r
 {\r
        USB_RNDIS_ProcessControlPacket(&Ethernet_RNDIS_Interface);\r