Partial commit: Rename USBFOO LED driver to fix capitalisation of file name, which...
[pub/USBasp.git] / Demos / Device / Incomplete / TestAndMeasurement / TestAndMeasurement.c
index 3c5cf47..0767127 100644 (file)
@@ -53,19 +53,19 @@ TMC_Capabilities_t Capabilities =
        };\r
 \r
 /** Current TMC control request that is being processed */\r
        };\r
 \r
 /** Current TMC control request that is being processed */\r
-uint8_t RequestInProgress = 0;\r
+static uint8_t RequestInProgress = 0;\r
 \r
 /** Stream callback abort flag for bulk IN data */\r
 \r
 /** Stream callback abort flag for bulk IN data */\r
-bool IsTMCBulkINReset = false;\r
+static bool IsTMCBulkINReset = false;\r
 \r
 /** Stream callback abort flag for bulk OUT data */\r
 \r
 /** Stream callback abort flag for bulk OUT data */\r
-bool IsTMCBulkOUTReset = false;\r
+static bool IsTMCBulkOUTReset = false;\r
 \r
 /** Last used tag value for data transfers */\r
 \r
 /** Last used tag value for data transfers */\r
-uint8_t CurrentTransferTag = 0;\r
+static uint8_t CurrentTransferTag = 0;\r
 \r
 \r
-/** Length of last data transfer, for reporting to the host in case an in-progress tranfer is aborted */\r
-uint32_t LastTransferLength = 0;\r
+/** Length of last data transfer, for reporting to the host in case an in-progress transfer is aborted */\r
+static uint32_t LastTransferLength = 0;\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
 /** Main program entry point. This routine contains the overall program flow, including initial\r
  *  setup of all components and the main program loop.\r
@@ -169,7 +169,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response byte */\r
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response byte */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
@@ -190,9 +190,9 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
                                                                \r
                                /* Write the request response bytes */\r
                                Endpoint_ClearSETUP();\r
                                                                \r
                                /* Write the request response bytes */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
-                               Endpoint_Write_Word_LE(0);\r
-                               Endpoint_Write_DWord_LE(LastTransferLength);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
+                               Endpoint_Write_16_LE(0);\r
+                               Endpoint_Write_32_LE(LastTransferLength);\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();                            \r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();                            \r
@@ -223,8 +223,8 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response bytes */\r
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response bytes */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
-                               Endpoint_Write_Byte(CurrentTransferTag);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
+                               Endpoint_Write_8(CurrentTransferTag);\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
@@ -245,9 +245,9 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
                                                                \r
                                /* Write the request response bytes */\r
                                Endpoint_ClearSETUP();\r
                                                                \r
                                /* Write the request response bytes */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
-                               Endpoint_Write_Word_LE(0);\r
-                               Endpoint_Write_DWord_LE(LastTransferLength);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
+                               Endpoint_Write_16_LE(0);\r
+                               Endpoint_Write_32_LE(LastTransferLength);\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
@@ -260,7 +260,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                /* Check that no split transaction is already in progress */\r
                                if (RequestInProgress != 0)\r
                                {\r
                                /* Check that no split transaction is already in progress */\r
                                if (RequestInProgress != 0)\r
                                {\r
-                                       Endpoint_Write_Byte(TMC_STATUS_SPLIT_IN_PROGRESS);                              \r
+                                       Endpoint_Write_8(TMC_STATUS_SPLIT_IN_PROGRESS);                         \r
                                }\r
                                else\r
                                {\r
                                }\r
                                else\r
                                {\r
@@ -275,7 +275,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response byte */\r
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response byte */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
@@ -296,8 +296,8 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
 \r
                                /* Write the request response bytes */\r
                                Endpoint_ClearSETUP();\r
 \r
                                /* Write the request response bytes */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
-                               Endpoint_Write_Byte(0);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
+                               Endpoint_Write_8(0);\r
                                \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();                            \r
                                \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();                            \r