3 memory: __code, _STATMEM
9 #pragma disable_warning 196 //no warning about pointer const qualifier (W_TARGET_LOST_QUALIFIER)
10 #include <sdcc-lib.h> /* just to get _STATMEM */
13 typedef unsigned char hid_report_descriptor
[8];
15 {memory
} char dummy
= 0; /*prevent hid_report_descriptor to land at address 0 */
16 {memory
} hid_report_descriptor HIDREPORTDESC
=
18 0x06, 0x00, 0xff, // USAGE_PAGE (Vendor Defined Page 1)
19 0x09, 0x01, // USAGE (Vendor Usage 1)
20 0xa1, 0x01, // COLLECTION (Application)
23 unsigned char* DATAPTR1
= ({memory
} unsigned char*)&HIDREPORTDESC
;
24 unsigned char* DATAPTR2
= ( unsigned char*)&HIDREPORTDESC
;
28 unsigned char* DATAPTR3
= ({memory
} unsigned char*)&HIDREPORTDESC
;
29 unsigned char* DATAPTR4
= ( unsigned char*)&HIDREPORTDESC
;
31 ASSERT(DATAPTR1
== DATAPTR2
);
32 /* FIXME: maybe a bug in gpsim */
33 #define MEMORY_{memory} 1
34 #if !(defined(__SDCC_pic14) && defined(__SDCC_PIC14_ENHANCED) && defined(MEMORY___code))
35 ASSERT(DATAPTR2
== DATAPTR3
);
37 ASSERT(DATAPTR3
== DATAPTR4
);