Mark build test makefiles as being incompatible with parallel make builds, as they...
[pub/USBasp.git] / Demos / Device / Incomplete / TestAndMeasurement / TestAndMeasurement.c
index c77b01e..027264a 100644 (file)
@@ -71,7 +71,7 @@ static uint16_t LastTransferLength = 0;
 static uint8_t NextResponseBuffer[64];
 
 /** Indicates the length of the next response to send */
 static uint8_t NextResponseBuffer[64];
 
 /** Indicates the length of the next response to send */
-static uint8_t NextReponseLen;
+static uint8_t NextResponseLen;
 
 /** Main program entry point. This routine contains the overall program flow, including initial
  *  setup of all components and the main program loop.
 
 /** Main program entry point. This routine contains the overall program flow, including initial
  *  setup of all components and the main program loop.
@@ -129,12 +129,9 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        bool ConfigSuccess = true;
 
        /* Setup TMC In, Out and Notification Endpoints */
        bool ConfigSuccess = true;
 
        /* Setup TMC In, Out and Notification Endpoints */
-       ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
-                                                   TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
-       ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_IN_EPNUM,  EP_TYPE_BULK, ENDPOINT_DIR_IN,
-                                                   TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
-       ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
-                                                   TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
+       ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, TMC_IO_EPSIZE, 1);
+       ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_IN_EPADDR,  EP_TYPE_BULK, TMC_IO_EPSIZE, 1);
+       ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_OUT_EPADDR, EP_TYPE_BULK, TMC_IO_EPSIZE, 1);
 
        /* Indicate endpoint configuration success or failure */
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 
        /* Indicate endpoint configuration success or failure */
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
@@ -329,16 +326,16 @@ void ProcessSentMessage(uint8_t* const Data, const uint8_t Length)
        if (strncmp((char*)Data, "*IDN?", 5) == 0)
          strcpy((char*)NextResponseBuffer, "LUFA TMC DEMO");
 
        if (strncmp((char*)Data, "*IDN?", 5) == 0)
          strcpy((char*)NextResponseBuffer, "LUFA TMC DEMO");
 
-       NextReponseLen = strlen((char*)NextResponseBuffer);
+       NextResponseLen = strlen((char*)NextResponseBuffer);
 }
 
 uint8_t GetNextMessage(uint8_t* const Data)
 {
          strcpy((char*)NextResponseBuffer, "LUFA TMC DEMO");
 
 }
 
 uint8_t GetNextMessage(uint8_t* const Data)
 {
          strcpy((char*)NextResponseBuffer, "LUFA TMC DEMO");
 
-       NextReponseLen = strlen((char*)NextResponseBuffer);
+       NextResponseLen = strlen((char*)NextResponseBuffer);
 // ---
 // ---
-       uint8_t DataLen = MIN(NextReponseLen, 64);
+       uint8_t DataLen = MIN(NextResponseLen, 64);
 
        strlcpy((char*)Data, (char*)NextResponseBuffer, DataLen);
 
 
        strlcpy((char*)Data, (char*)NextResponseBuffer, DataLen);
 
@@ -418,7 +415,7 @@ bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader)
        uint8_t  ErrorCode;
 
        /* Select the Data Out endpoint */
        uint8_t  ErrorCode;
 
        /* Select the Data Out endpoint */
-       Endpoint_SelectEndpoint(TMC_OUT_EPNUM);
+       Endpoint_SelectEndpoint(TMC_OUT_EPADDR);
 
        /* Abort if no command has been sent from the host */
        if (!(Endpoint_IsOUTReceived()))
 
        /* Abort if no command has been sent from the host */
        if (!(Endpoint_IsOUTReceived()))
@@ -450,7 +447,7 @@ bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader)
        MessageHeader->InverseTag = ~CurrentTransferTag;
 
        /* Select the Data In endpoint */
        MessageHeader->InverseTag = ~CurrentTransferTag;
 
        /* Select the Data In endpoint */
-       Endpoint_SelectEndpoint(TMC_IN_EPNUM);
+       Endpoint_SelectEndpoint(TMC_IN_EPADDR);
 
        /* Send the command header to the host */
        BytesTransferred = 0;
 
        /* Send the command header to the host */
        BytesTransferred = 0;