Documentation improvements - put driver example code into its own section, fix incorr...
[pub/USBasp.git] / Demos / Device / Incomplete / TestAndMeasurement / TestAndMeasurement.c
index 55e17bc..027400c 100644 (file)
@@ -3,7 +3,7 @@
      Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
+           www.lufa-lib.org\r
 */\r
 \r
 /*\r
@@ -121,22 +121,22 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        bool ConfigSuccess = true;\r
 \r
        /* Setup TMC In, Out and Notification Endpoints */\r
+       ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,\r
+                                                   TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);\r
        ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_IN_EPNUM,  EP_TYPE_BULK, ENDPOINT_DIR_IN,\r
                                                    TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);\r
        ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,\r
                                                    TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);\r
-       ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,\r
-                                                   TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);\r
 \r
        /* Indicate endpoint configuration success or failure */\r
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);\r
 }\r
 \r
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific\r
- *  control requests that are not handled internally by the USB library (including the CDC control commands,\r
- *  which are all issued via the control endpoint), so that they can be handled appropriately for the application.\r
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to\r
+ *  the device from the USB host before passing along unhandled control requests to the library for processing\r
+ *  internally.\r
  */\r
-void EVENT_USB_Device_UnhandledControlRequest(void)\r
+void EVENT_USB_Device_ControlRequest(void)\r
 {\r
        uint8_t TMCRequestStatus = TMC_STATUS_SUCCESS;\r
 \r
@@ -429,3 +429,4 @@ uint8_t StreamCallback_AbortOUTOnRequest(void)
        /* Continue with the current stream operation */\r
        return STREAMCALLBACK_Continue;\r
 }\r
+