From 9b0e4b8356eb79003a806d010f4b00123350ed90 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 22 Jul 2010 15:38:12 +0000 Subject: Convert over internal pseudo-function macros to true inline functions for added type-safety and compile-checking. --- .../TestAndMeasurement/TestAndMeasurement.h | 31 +++++++++++++--------- 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'Demos') diff --git a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h index cd7dad54e..0a4a629a5 100644 --- a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h +++ b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h @@ -45,25 +45,32 @@ /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ - #define LEDMASK_USB_NOTREADY LEDS_LED1 + #define LEDMASK_USB_NOTREADY LEDS_LED1 /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */ - #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3) + #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3) /** LED mask for the library LED driver, to indicate that the USB interface is ready. */ - #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4) + #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4) /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */ - #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3) + #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3) - #define Req_InitiateAbortBulkOut 0x01 - #define Req_CheckAbortBulkOutStatus 0x02 - #define Req_InitiateAbortBulkIn 0x03 - #define Req_CheckAbortBulkInStatus 0x04 - #define Req_InitiateClear 0x05 - #define Req_CheckClearStatus 0x06 - #define Req_GetCapabilities 0x07 - #define Req_IndicatorPulse 0x40 + #define Req_InitiateAbortBulkOut 0x01 + #define Req_CheckAbortBulkOutStatus 0x02 + #define Req_InitiateAbortBulkIn 0x03 + #define Req_CheckAbortBulkInStatus 0x04 + #define Req_InitiateClear 0x05 + #define Req_CheckClearStatus 0x06 + #define Req_GetCapabilities 0x07 + #define Req_IndicatorPulse 0x40 + + #define TMC_REQUEST_STATUS_SUCCESS 0x01 + #define TMC_REQUEST_STATUS_PENDING 0x02 + #define TMC_REQUEST_STATUS_FAILED 0x80 + #define TMC_REQUEST_STATUS_NOTRANSFER 0x81 + #define TMC_REQUEST_STATUS_NOCHECKINITIATED 0x82 + #define TMC_REQUEST_STATUS_CHECKINPROGRESS 0x83 /* Function Prototypes: */ void SetupHardware(void); -- cgit v1.2.3