diff options
| author | hathach <[email protected]> | 2013-09-22 23:54:44 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-09-22 23:54:44 +0700 |
| commit | a8a10e86502617313ced924691a014d94bd54c82 (patch) | |
| tree | 7fba4baf6d2b158b5f0dbb5d4465bf55e1d0c23a /tinyusb/common | |
| parent | cc91a73cdc8c6f46adfcae38e4c36d819a49ab01 (diff) | |
added read capacity 10 with hacking code
Diffstat (limited to 'tinyusb/common')
| -rw-r--r-- | tinyusb/common/compiler/compiler_gcc.h | 4 | ||||
| -rw-r--r-- | tinyusb/common/compiler/compiler_iar.h | 3 | ||||
| -rw-r--r-- | tinyusb/common/errors.h | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/tinyusb/common/compiler/compiler_gcc.h b/tinyusb/common/compiler/compiler_gcc.h index e9f83a5d7..b0fff10c0 100644 --- a/tinyusb/common/compiler/compiler_gcc.h +++ b/tinyusb/common/compiler/compiler_gcc.h @@ -130,6 +130,10 @@ * @{ */ +// built-in function to convert 32-bit Big-Endian to Little-Endian +#define __be2le __builtin_bswap32 + + /** You can use the built-in function \b __builtin_constant_p to determine if a value is known to be constant at compile time and hence that GCC can perform constant-folding on expressions involving that value. The argument of the function is the value to test. The function returns the integer 1 if the argument is known to be a compile-time constant and 0 if it is not known to be a compile-time constant. A return of 0 does not indicate that the value is not a constant, but merely that GCC cannot prove it is a constant with the specified value of the -O option. You typically use this function in an embedded application where memory is a critical resource. If you have some complex calculation, you may want it to be folded if it involves constants, but need to call a function if it does not. For example: \code diff --git a/tinyusb/common/compiler/compiler_iar.h b/tinyusb/common/compiler/compiler_iar.h index 80373c1c1..82f5079df 100644 --- a/tinyusb/common/compiler/compiler_iar.h +++ b/tinyusb/common/compiler/compiler_iar.h @@ -83,6 +83,9 @@ #define ATTR_USED #define ATTR_UNUSED +// built-in function to convert 32-bit Big-Endian to Little-Endian +#define __be2le __REV + #if 0 /** Indicates to the compiler that the function can not ever return, so that any stack restoring or diff --git a/tinyusb/common/errors.h b/tinyusb/common/errors.h index fae65a1d3..96681624c 100644 --- a/tinyusb/common/errors.h +++ b/tinyusb/common/errors.h @@ -85,6 +85,8 @@ ENTRY(TUSB_ERROR_CDCH_UNSUPPORTED_PROTOCOL )\ ENTRY(TUSB_ERROR_CDCH_DEVICE_NOT_MOUNTED )\ ENTRY(TUSB_ERROR_MSCH_UNSUPPORTED_PROTOCOL )\ + ENTRY(TUSB_ERROR_MSCH_UNKNOWN_SCSI_COMMAND )\ + ENTRY(TUSB_ERROR_MSCH_DEVICE_NOT_MOUNTED )\ ENTRY(TUSB_ERROR_NOT_SUPPORTED_YET )\ ENTRY(TUSB_ERROR_FAILED )\ |
