Skip to content

Commit 5cbfd74

Browse files
committed
TEST: Is LITTLE_ENDIAN already properly defined?
1 parent 1a89b14 commit 5cbfd74

File tree

24 files changed

+48
-96
lines changed

24 files changed

+48
-96
lines changed

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21e15a.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,8 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222-
#error "Little Endian is already defined, but to different value than expected?!"
223-
#else
224-
#define LITTLE_ENDIAN 1
221+
#if !defined(LITTLE_ENDIAN) || (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is not already defined, or defined to a value other than 1?!"
225223
#endif
226224
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227225
#define __MPU_PRESENT 0 /*!< MPU present or not */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21e16a.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,8 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222-
#error "Little Endian is already defined, but to different value than expected?!"
223-
#else
224-
#define LITTLE_ENDIAN 1
221+
#if !defined(LITTLE_ENDIAN) || (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is not already defined, or defined to a value other than 1?!"
225223
#endif
226224
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227225
#define __MPU_PRESENT 0 /*!< MPU present or not */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21e17a.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,8 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222-
#error "Little Endian is already defined, but to different value than expected?!"
223-
#else
224-
#define LITTLE_ENDIAN 1
221+
#if !defined(LITTLE_ENDIAN) || (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is not already defined, or defined to a value other than 1?!"
225223
#endif
226224
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227225
#define __MPU_PRESENT 0 /*!< MPU present or not */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21e18a.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,8 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222-
#error "Little Endian is already defined, but to different value than expected?!"
223-
#else
224-
#define LITTLE_ENDIAN 1
221+
#if !defined(LITTLE_ENDIAN) || (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is not already defined, or defined to a value other than 1?!"
225223
#endif
226224
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227225
#define __MPU_PRESENT 0 /*!< MPU present or not */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21g15a.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,8 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226-
#error "Little Endian is already defined, but to different value than expected?!"
227-
#else
228-
#define LITTLE_ENDIAN 1
225+
#if !defined(LITTLE_ENDIAN) || (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is not already defined, or defined to a value other than 1?!"
229227
#endif
230228
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231229
#define __MPU_PRESENT 0 /*!< MPU present or not */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21g16a.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,8 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226-
#error "Little Endian is already defined, but to different value than expected?!"
227-
#else
228-
#define LITTLE_ENDIAN 1
225+
#if !defined(LITTLE_ENDIAN) || (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is not already defined, or defined to a value other than 1?!"
229227
#endif
230228
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231229
#define __MPU_PRESENT 0 /*!< MPU present or not */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21g17a.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,8 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226-
#error "Little Endian is already defined, but to different value than expected?!"
227-
#else
228-
#define LITTLE_ENDIAN 1
225+
#if !defined(LITTLE_ENDIAN) || (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is not already defined, or defined to a value other than 1?!"
229227
#endif
230228
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231229
#define __MPU_PRESENT 0 /*!< MPU present or not */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21g18a.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,8 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226-
#error "Little Endian is already defined, but to different value than expected?!"
227-
#else
228-
#define LITTLE_ENDIAN 1
225+
#if !defined(LITTLE_ENDIAN) || (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is not already defined, or defined to a value other than 1?!"
229227
#endif
230228
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231229
#define __MPU_PRESENT 0 /*!< MPU present or not */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21j15a.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,8 @@ void I2S_Handler ( void );
226226
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
227227
*/
228228

229-
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
230-
#error "Little Endian is already defined, but to different value than expected?!"
231-
#else
232-
#define LITTLE_ENDIAN 1
229+
#if !defined(LITTLE_ENDIAN) || (LITTLE_ENDIAN != 1)
230+
#error "Little Endian is not already defined, or defined to a value other than 1?!"
233231
#endif
234232
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
235233
#define __MPU_PRESENT 0 /*!< MPU present or not */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21j16a.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,8 @@ void I2S_Handler ( void );
226226
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
227227
*/
228228

229-
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
230-
#error "Little Endian is already defined, but to different value than expected?!"
231-
#else
232-
#define LITTLE_ENDIAN 1
229+
#if !defined(LITTLE_ENDIAN) || (LITTLE_ENDIAN != 1)
230+
#error "Little Endian is not already defined, or defined to a value other than 1?!"
233231
#endif
234232
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
235233
#define __MPU_PRESENT 0 /*!< MPU present or not */

0 commit comments

Comments
 (0)