diff options
Diffstat (limited to 'Demos/Device/Incomplete')
-rw-r--r-- | Demos/Device/Incomplete/Sideshow/makefile | 5 | ||||
-rw-r--r-- | Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c | 12 | ||||
-rw-r--r-- | Demos/Device/Incomplete/TestAndMeasurement/makefile | 5 |
3 files changed, 17 insertions, 5 deletions
diff --git a/Demos/Device/Incomplete/Sideshow/makefile b/Demos/Device/Incomplete/Sideshow/makefile index 1565b991e..7e09f23b9 100644 --- a/Demos/Device/Incomplete/Sideshow/makefile +++ b/Demos/Device/Incomplete/Sideshow/makefile @@ -496,7 +496,10 @@ end: # Display size of file. HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex -ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf +ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf +MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) ) +FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr ) + sizebefore: @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \ diff --git a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c index cab978a85..040cb345d 100644 --- a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c +++ b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c @@ -332,7 +332,7 @@ void TMC_Task(void) TMC_MessageHeader_t MessageHeader;
- /* Check if a TMC packet has been received */
+ /* Try to read in a TMC message from the interface, process if one is available */
if (ReadTMCHeader(&MessageHeader))
{
/* Indicate busy */
@@ -366,6 +366,12 @@ void TMC_Task(void) IsTMCBulkOUTReset = false;
}
+/** Attempts to read in the TMC message header from the TMC interface.
+ *
+ * \param[out] MessageHeader Pointer to a location where the read header (if any) should be stored
+ *
+ * \return Boolean true if a header was read, false otherwise
+ */
bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader)
{
/* Select the Data Out endpoint */
@@ -382,7 +388,7 @@ bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader) CurrentTransferTag = MessageHeader->Tag;
/* Indicate if the command has been aborted or not */
- return !IsTMCBulkOUTReset;
+ return !(IsTMCBulkOUTReset);
}
bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader)
@@ -402,7 +408,7 @@ bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader) Endpoint_Write_Stream_LE(MessageHeader, sizeof(TMC_MessageHeader_t), StreamCallback_AbortINOnRequest);
/* Indicate if the command has been aborted or not */
- return !IsTMCBulkINReset;
+ return !(IsTMCBulkINReset);
}
/** Stream callback function for the Endpoint stream write functions. This callback will abort the current stream transfer
diff --git a/Demos/Device/Incomplete/TestAndMeasurement/makefile b/Demos/Device/Incomplete/TestAndMeasurement/makefile index 94e697eae..3351364b1 100644 --- a/Demos/Device/Incomplete/TestAndMeasurement/makefile +++ b/Demos/Device/Incomplete/TestAndMeasurement/makefile @@ -490,7 +490,10 @@ end: # Display size of file. HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex -ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf +ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf +MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) ) +FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr ) + sizebefore: @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \ |