Skip to content

Commit a2c9a43

Browse files
committed
Fix compilation on SAML21J18A
1 parent 8891b85 commit a2c9a43

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

targets/TARGET_Atmel/TARGET_SAM_CortexM0P/TARGET_SAML21J18A/analogout_api.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include "PeripheralPins.h"
2222
#include "dac.h"
2323

24+
#if DEVICE_ANALOGOUT
25+
2426
extern uint8_t g_sys_init;
2527

2628
#define MAX_VAL_12BIT 0x0FFF /*12 Bit DAC for SAML21*/
@@ -119,4 +121,5 @@ const PinMap *analogout_pinmap()
119121
{
120122
return PinMap_DAC;
121123
}
122-
#endif
124+
125+
#endif // DEVICE_ANALOGOUT

targets/TARGET_Atmel/TARGET_SAM_CortexM0P/utils/compiler.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,7 @@ typedef uint64_t U64; //!< 64-bit unsigned integer.
846846
typedef float F32; //!< 32-bit floating-point number.
847847
typedef double F64; //!< 64-bit floating-point number.
848848

849+
#if 0
849850
#define MSB(u16) (((U8 *)&(u16))[1]) //!< Most significant byte of \a u16.
850851
#define LSB(u16) (((U8 *)&(u16))[0]) //!< Least significant byte of \a u16.
851852

@@ -895,6 +896,7 @@ typedef double F64; //!< 64-bit floating-point number.
895896
#define MSB2(u32) MSB2W(u32) //!< Most significant byte of 3rd rank of \a u32.
896897
#define MSB1(u32) MSB1W(u32) //!< Most significant byte of 2nd rank of \a u32.
897898
#define MSB0(u32) MSB0W(u32) //!< Most significant byte of 1st rank of \a u32.
899+
#endif
898900

899901
#if defined(__ICCARM__)
900902
#define SHORTENUM __packed

0 commit comments

Comments
 (0)