Minor documentation page updates.
[pub/USBasp.git] / Demos / Device / MassStorage / MassStorage.c
index 8e2b9f4..5dbc4a2 100644 (file)
   this software.\r
 */\r
 \r
+/** \file\r
+ *\r
+ *  Main source file for the MassStorage demo. This file contains the main tasks of\r
+ *  the demo and is responsible for the initial application hardware configuration.\r
+ */\r
+\r
 #include "MassStorage.h"\r
 \r
+/** LUFA Mass Storage Class driver interface configuration and state information. This structure is\r
+ *  passed to all Mass Storage 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_MS_t Disk_MS_Interface =\r
        {\r
                .InterfaceNumber        = 0,\r
@@ -43,6 +53,9 @@ USB_ClassInfo_MS_t Disk_MS_Interface =
                .TotalLUNs              = TOTAL_LUNS,\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
@@ -56,6 +69,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
@@ -74,16 +88,19 @@ void SetupHardware(void)
        DataflashManager_ResetDataflashProtections();\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
 }\r
 \r
+/** Event handler for the library USB Disconnection event. */\r
 void EVENT_USB_Disconnect(void)\r
 {\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
@@ -92,11 +109,16 @@ 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_MS_ProcessControlPacket(&Disk_MS_Interface);\r
 }\r
 \r
+/** Mass Storage class driver callback function the reception of SCSI commands from the host, which must be processed.\r
+ *\r
+ *  \param MSInterfaceInfo  Pointer to the Mass Storage class interface configuration structure being referenced\r
+ */\r
 bool CALLBACK_USB_MS_SCSICommandReceived(USB_ClassInfo_MS_t* MSInterfaceInfo)\r
 {\r
        bool CommandSuccess;\r