Fix warnings about redefinition of LITTLE_ENDIAN
For safety, this fix also validates that, if `LITTLE_ENDIAN` was already defined, that it was defined to have the same value that the code sets this to.
This commit is contained in:
parent
330cb4e652
commit
70d3c1dbfe
24 changed files with 120 additions and 24 deletions
|
|
@ -218,7 +218,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -218,7 +218,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -218,7 +218,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -218,7 +218,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -222,7 +222,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -222,7 +222,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -222,7 +222,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -222,7 +222,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -226,7 +226,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -226,7 +226,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -226,7 +226,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -226,7 +226,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -218,7 +218,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -218,7 +218,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -218,7 +218,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -218,7 +218,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -222,7 +222,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -222,7 +222,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -222,7 +222,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -222,7 +222,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -226,7 +226,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -226,7 +226,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -226,7 +226,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
|
|
@ -226,7 +226,11 @@ void I2S_Handler ( void );
|
|||
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
|
||||
*/
|
||||
|
||||
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
|
||||
#error "Little Endian is already defined, but to different value than expected?!"
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
|
||||
#define __MPU_PRESENT 0 /*!< MPU present or not */
|
||||
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
|
||||
|
|
|
|||
Loading…
Reference in a new issue