Content originally posted in LPCWare by yilmazkircicek on Thu Feb 14 08:02:26 MST 2013
__ICCARM__ definition is related with IAR and referenced in USB library. (Common.h)
And causes 3 warning for Descriptors.h due to PROGMEM.
Descriptors.c(43): warning: #83-D: type qualifier specified more than once
(for dublicate const, const & PROGMEM=const)
I am using Keil, do I need to define __ICCARM__ to remove warnings ?
Best regards.
const USB_Descriptor_HIDReport_Datatype_t PROGMEM GenericReport[] = ..
const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =...
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = ...
#elif (ARCH == ARCH_LPC)
typedef uint32_t uint_reg_t;
#define ARCH_LITTLE_ENDIAN
#if !defined(__ICCARM__)
#define PROGMEM const
#else
#define PROGMEM
#endif
#define pgm_read_byte(x) (*x)
#define memcmp_P(...) memcmp(__VA_ARGS__)
#define memcpy_P(...) memcpy(__VA_ARGS__)
#include "Endianness.h"