Indent the define statement by two spaces
follow the code style convention Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
e68d5ffb98
commit
7032c72f2f
@ -36,11 +36,11 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_EXAMPLES_CALIB_UDELAY_NUM_MEASUREMENTS
|
||||
# define CONFIG_EXAMPLES_CALIB_UDELAY_NUM_MEASUREMENTS 3
|
||||
# define CONFIG_EXAMPLES_CALIB_UDELAY_NUM_MEASUREMENTS 3
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_EXAMPLES_CALIB_UDELAY_NUM_RESULTS
|
||||
# define CONFIG_EXAMPLES_CALIB_UDELAY_NUM_RESULTS 20
|
||||
# define CONFIG_EXAMPLES_CALIB_UDELAY_NUM_RESULTS 20
|
||||
#endif
|
||||
|
||||
#define DELAY_TEST_ITERS 100000
|
||||
|
@ -178,7 +178,7 @@ static void show_statfs(const char *path)
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define show_statfs(p)
|
||||
# define show_statfs(p)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -227,7 +227,7 @@ static void show_directories(const char *path, int indent)
|
||||
closedir(dirp);
|
||||
}
|
||||
#else
|
||||
# define show_directories(p,i)
|
||||
# define show_directories(p,i)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -558,7 +558,7 @@ static void fail_stat(const char *path, int expectederror)
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define fail_stat(p,e);
|
||||
# define fail_stat(p,e);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -43,15 +43,15 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_EXAMPLES_WGETJSON_MAXSIZE
|
||||
# define CONFIG_EXAMPLES_WGETJSON_MAXSIZE 1024
|
||||
# define CONFIG_EXAMPLES_WGETJSON_MAXSIZE 1024
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_EXAMPLES_WGETJSON_URL
|
||||
# define CONFIG_EXAMPLES_WGETJSON_URL "http://10.0.0.1/wgetjson/json_cmd.php"
|
||||
# define CONFIG_EXAMPLES_WGETJSON_URL "http://10.0.0.1/wgetjson/json_cmd.php"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_EXAMPLES_WGETPOST_URL
|
||||
# define CONFIG_EXAMPLES_WGETPOST_URL "http://10.0.0.1/wgetjson/post_cmd.php"
|
||||
# define CONFIG_EXAMPLES_WGETPOST_URL "http://10.0.0.1/wgetjson/post_cmd.php"
|
||||
#endif
|
||||
|
||||
#define MULTI_POST_NDATA 3
|
||||
|
@ -274,31 +274,31 @@
|
||||
# error "Illegal value for CONFIG_FAT_MAXFNAME"
|
||||
# endif
|
||||
|
||||
# define LDIR_MAXLFNCHARS 13 /* Max unicode characters in one LFN entry */
|
||||
# define LDIR_MAXLFNS 20 /* Max number of LFN entries */
|
||||
# define LDIR_MAXLFNCHARS 13 /* Max unicode characters in one LFN entry */
|
||||
# define LDIR_MAXLFNS 20 /* Max number of LFN entries */
|
||||
|
||||
/* LFN directory entry offsets */
|
||||
|
||||
# define LDIR_SEQ 0 /* 1@ 0: Sequence number */
|
||||
# define LDIR_WCHAR1_5 1 /* 10@ 1: File name characters 1-5 (5 Unicode characters) */
|
||||
# define LDIR_ATTRIBUTES 11 /* 1@11: File attributes (always 0x0f) */
|
||||
# define LDIR_NTRES 12 /* 1@12: Reserved for use by NT (always 0x00) */
|
||||
# define LDIR_CHECKSUM 13 /* 1@13: Checksum of the DOS filename */
|
||||
# define LDIR_WCHAR6_11 14 /* 12@14: File name characters 6-11 (6 Unicode characters) */
|
||||
# define LDIR_FSTCLUSTLO 26 /* 2@26: First cluster (always 0x0000) */
|
||||
# define LDIR_WCHAR12_13 28 /* 4@28: File name characters 12-13 (2 Unicode characters) */
|
||||
# define LDIR_SEQ 0 /* 1@ 0: Sequence number */
|
||||
# define LDIR_WCHAR1_5 1 /* 10@ 1: File name characters 1-5 (5 Unicode characters) */
|
||||
# define LDIR_ATTRIBUTES 11 /* 1@11: File attributes (always 0x0f) */
|
||||
# define LDIR_NTRES 12 /* 1@12: Reserved for use by NT (always 0x00) */
|
||||
# define LDIR_CHECKSUM 13 /* 1@13: Checksum of the DOS filename */
|
||||
# define LDIR_WCHAR6_11 14 /* 12@14: File name characters 6-11 (6 Unicode characters) */
|
||||
# define LDIR_FSTCLUSTLO 26 /* 2@26: First cluster (always 0x0000) */
|
||||
# define LDIR_WCHAR12_13 28 /* 4@28: File name characters 12-13 (2 Unicode characters) */
|
||||
|
||||
/* LFN sequence number and allocation status */
|
||||
|
||||
# define LDIR0_EMPTY DIR0_EMPTY /* The directory entry is empty */
|
||||
# define LDIR0_ALLEMPTY DIR0_ALLEMPTY /* This entry and all following are empty */
|
||||
# define LDIR0_E5 DIR0_E5 /* The actual value is 0xe5 */
|
||||
# define LDIR0_LAST 0x40 /* Last LFN in file name (appears first) */
|
||||
# define LDIR0_SEQ_MASK 0x1f /* Mask for sequence number (1-20) */
|
||||
# define LDIR0_EMPTY DIR0_EMPTY /* The directory entry is empty */
|
||||
# define LDIR0_ALLEMPTY DIR0_ALLEMPTY /* This entry and all following are empty */
|
||||
# define LDIR0_E5 DIR0_E5 /* The actual value is 0xe5 */
|
||||
# define LDIR0_LAST 0x40 /* Last LFN in file name (appears first) */
|
||||
# define LDIR0_SEQ_MASK 0x1f /* Mask for sequence number (1-20) */
|
||||
|
||||
/* The LFN entry attribute */
|
||||
|
||||
# define LDDIR_LFNATTR 0x0f
|
||||
# define LDDIR_LFNATTR 0x0f
|
||||
#endif
|
||||
|
||||
/* File system types */
|
||||
@ -453,10 +453,10 @@
|
||||
#define DIR_PUTCRTTIMETENTH(p,v) UBYTE_PUT(p,DIR_CRTTIMETENTH,v)
|
||||
|
||||
#ifdef CONFIG_FAT_LFN
|
||||
# define LDIR_PUTSEQ(p,v) UBYTE_PUT(p,LDIR_SEQ,v)
|
||||
# define LDIR_PUTATTRIBUTES(p,v) UBYTE_PUT(p,LDIR_ATTRIBUTES,v)
|
||||
# define LDIR_PUTNTRES(p,v) UBYTE_PUT(p,LDIR_NTRES,v)
|
||||
# define LDIR_PUTCHECKSUM(p,v) UBYTE_PUT(p,LDIR_CHECKSUM,v)
|
||||
# define LDIR_PUTSEQ(p,v) UBYTE_PUT(p,LDIR_SEQ,v)
|
||||
# define LDIR_PUTATTRIBUTES(p,v) UBYTE_PUT(p,LDIR_ATTRIBUTES,v)
|
||||
# define LDIR_PUTNTRES(p,v) UBYTE_PUT(p,LDIR_NTRES,v)
|
||||
# define LDIR_PUTCHECKSUM(p,v) UBYTE_PUT(p,LDIR_CHECKSUM,v)
|
||||
#endif
|
||||
|
||||
/* For the all targets, unaligned values need to be accessed byte-by-byte.
|
||||
@ -490,9 +490,9 @@
|
||||
#define PART4_PUTSIZE(p,v) FAT_PUTUINT32(UBYTE_PTR(p,PART_ENTRY4+PART_SIZE),v)
|
||||
|
||||
#ifdef CONFIG_FAT_LFN
|
||||
# define LDIR_PTRWCHAR1_5(p) UBYTE_PTR(p,LDIR_WCHAR1_5)
|
||||
# define LDIR_PTRWCHAR6_11(p) UBYTE_PTR(p,LDIR_WCHAR6_11)
|
||||
# define LDIR_PTRWCHAR12_13(p) UBYTE_PTR(p,LDIR_WCHAR12_13)
|
||||
# define LDIR_PTRWCHAR1_5(p) UBYTE_PTR(p,LDIR_WCHAR1_5)
|
||||
# define LDIR_PTRWCHAR6_11(p) UBYTE_PTR(p,LDIR_WCHAR6_11)
|
||||
# define LDIR_PTRWCHAR12_13(p) UBYTE_PTR(p,LDIR_WCHAR12_13)
|
||||
#endif
|
||||
|
||||
/* But for multi-byte values, the endian-ness of the target vs. the little
|
||||
@ -506,48 +506,48 @@
|
||||
* accessed byte-by-byte.
|
||||
*/
|
||||
|
||||
# define MBR_PUTRESVDSECCOUNT(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR_RESVDSECCOUNT),v)
|
||||
# define MBR_PUTFATSZ16(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR_FATSZ16),v)
|
||||
# define MBR_PUTSECPERTRK(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR_SECPERTRK),v)
|
||||
# define MBR_PUTNUMHEADS(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR_NUMHEADS),v)
|
||||
# define MBR_PUTHIDSEC(p,v) FAT_PUTUINT32(UBYTE_PTR(p,MBR_HIDSEC),v)
|
||||
# define MBR_PUTTOTSEC32(p,v) FAT_PUTUINT32(UBYTE_PTR(p,MBR_TOTSEC32),v)
|
||||
# define MBR_PUTFATSZ32(p,v) FAT_PUTUINT32(UBYTE_PTR(p,MBR32_FATSZ32),v)
|
||||
# define MBR_PUTEXTFLAGS(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR32_EXTFLAGS),v)
|
||||
# define MBR_PUTFSVER(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR32_FSVER),v)
|
||||
# define MBR_PUTROOTCLUS(p,v) FAT_PUTUINT32(UBYTE_PTR(p,MBR32_ROOTCLUS),v)
|
||||
# define MBR_PUTFSINFO(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR32_FSINFO),v)
|
||||
# define MBR_PUTBKBOOTSEC(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR32_BKBOOTSEC),v)
|
||||
# define MBR_PUTSIGNATURE(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR_SIGNATURE),v)
|
||||
# define MBR_PUTRESVDSECCOUNT(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR_RESVDSECCOUNT),v)
|
||||
# define MBR_PUTFATSZ16(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR_FATSZ16),v)
|
||||
# define MBR_PUTSECPERTRK(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR_SECPERTRK),v)
|
||||
# define MBR_PUTNUMHEADS(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR_NUMHEADS),v)
|
||||
# define MBR_PUTHIDSEC(p,v) FAT_PUTUINT32(UBYTE_PTR(p,MBR_HIDSEC),v)
|
||||
# define MBR_PUTTOTSEC32(p,v) FAT_PUTUINT32(UBYTE_PTR(p,MBR_TOTSEC32),v)
|
||||
# define MBR_PUTFATSZ32(p,v) FAT_PUTUINT32(UBYTE_PTR(p,MBR32_FATSZ32),v)
|
||||
# define MBR_PUTEXTFLAGS(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR32_EXTFLAGS),v)
|
||||
# define MBR_PUTFSVER(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR32_FSVER),v)
|
||||
# define MBR_PUTROOTCLUS(p,v) FAT_PUTUINT32(UBYTE_PTR(p,MBR32_ROOTCLUS),v)
|
||||
# define MBR_PUTFSINFO(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR32_FSINFO),v)
|
||||
# define MBR_PUTBKBOOTSEC(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR32_BKBOOTSEC),v)
|
||||
# define MBR_PUTSIGNATURE(p,v) FAT_PUTUINT16(UBYTE_PTR(p,MBR_SIGNATURE),v)
|
||||
|
||||
# define FBR_PUTRESVDSECCOUNT(p,v) fat_putuint16(UBYTE_PTR(p,FBR_RESVDSECCOUNT),v)
|
||||
# define FBR_PUTFATSZ16(p,v) fat_putuint16(UBYTE_PTR(p,FBR_FATSZ16),v)
|
||||
# define FBR_PUTSECPERTRK(p,v) fat_putuint16(UBYTE_PTR(p,FBR_SECPERTRK),v)
|
||||
# define FBR_PUTNUMHEADS(p,v) fat_putuint16(UBYTE_PTR(p,FBR_NUMHEADS),v)
|
||||
# define FBR_PUTHIDSEC(p,v) fat_putuint32(UBYTE_PTR(p,FBR_HIDSEC),v)
|
||||
# define FBR_PUTTOTSEC32(p,v) fat_putuint32(UBYTE_PTR(p,FBR_TOTSEC32),v)
|
||||
# define FBR_PUTFATSZ32(p,v) fat_putuint32(UBYTE_PTR(p,FBR_FATSZ32),v)
|
||||
# define FBR_PUTEXTFLAGS(p,v) fat_putuint16(UBYTE_PTR(p,FBR_EXTFLAGS),v)
|
||||
# define FBR_PUTFSVER(p,v) fat_putuint16(UBYTE_PTR(p,FBR_FSVER),v)
|
||||
# define FBR_PUTROOTCLUS(p,v) fat_putuint32(UBYTE_PTR(p,FBR_ROOTCLUS),v)
|
||||
# define FBR_PUTFSINFO(p,v) fat_putuint16(UBYTE_PTR(p,FBR_FSINFO),v)
|
||||
# define FBR_PUTBKBOOTSEC(p,v) fat_putuint16(UBYTE_PTR(p,FBR_BKBOOTSEC),v)
|
||||
# define FBR_PUTSIGNATURE(p,v) fat_putuint16(UBYTE_PTR(p,FBR_SIGNATURE),v)
|
||||
# define FBR_PUTRESVDSECCOUNT(p,v) fat_putuint16(UBYTE_PTR(p,FBR_RESVDSECCOUNT),v)
|
||||
# define FBR_PUTFATSZ16(p,v) fat_putuint16(UBYTE_PTR(p,FBR_FATSZ16),v)
|
||||
# define FBR_PUTSECPERTRK(p,v) fat_putuint16(UBYTE_PTR(p,FBR_SECPERTRK),v)
|
||||
# define FBR_PUTNUMHEADS(p,v) fat_putuint16(UBYTE_PTR(p,FBR_NUMHEADS),v)
|
||||
# define FBR_PUTHIDSEC(p,v) fat_putuint32(UBYTE_PTR(p,FBR_HIDSEC),v)
|
||||
# define FBR_PUTTOTSEC32(p,v) fat_putuint32(UBYTE_PTR(p,FBR_TOTSEC32),v)
|
||||
# define FBR_PUTFATSZ32(p,v) fat_putuint32(UBYTE_PTR(p,FBR_FATSZ32),v)
|
||||
# define FBR_PUTEXTFLAGS(p,v) fat_putuint16(UBYTE_PTR(p,FBR_EXTFLAGS),v)
|
||||
# define FBR_PUTFSVER(p,v) fat_putuint16(UBYTE_PTR(p,FBR_FSVER),v)
|
||||
# define FBR_PUTROOTCLUS(p,v) fat_putuint32(UBYTE_PTR(p,FBR_ROOTCLUS),v)
|
||||
# define FBR_PUTFSINFO(p,v) fat_putuint16(UBYTE_PTR(p,FBR_FSINFO),v)
|
||||
# define FBR_PUTBKBOOTSEC(p,v) fat_putuint16(UBYTE_PTR(p,FBR_BKBOOTSEC),v)
|
||||
# define FBR_PUTSIGNATURE(p,v) fat_putuint16(UBYTE_PTR(p,FBR_SIGNATURE),v)
|
||||
|
||||
# define FSI_PUTLEADSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_LEADSIG),v)
|
||||
# define FSI_PUTSTRUCTSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_STRUCTSIG),v)
|
||||
# define FSI_PUTFREECOUNT(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_FREECOUNT),v)
|
||||
# define FSI_PUTNXTFREE(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_NXTFREE),v)
|
||||
# define FSI_PUTTRAILSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_TRAILSIG),v)
|
||||
# define FSI_PUTLEADSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_LEADSIG),v)
|
||||
# define FSI_PUTSTRUCTSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_STRUCTSIG),v)
|
||||
# define FSI_PUTFREECOUNT(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_FREECOUNT),v)
|
||||
# define FSI_PUTNXTFREE(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_NXTFREE),v)
|
||||
# define FSI_PUTTRAILSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_TRAILSIG),v)
|
||||
|
||||
# define DIR_PUTCRTIME(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_CRTIME),v)
|
||||
# define DIR_PUTCRDATE(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_CRDATE),v)
|
||||
# define DIR_PUTLASTACCDATE(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_LASTACCDATE),v)
|
||||
# define DIR_PUTFSTCLUSTHI(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_FSTCLUSTHI),v)
|
||||
# define DIR_PUTWRTTIME(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_WRTTIME),v)
|
||||
# define DIR_PUTWRTDATE(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_WRTDATE),v)
|
||||
# define DIR_PUTFSTCLUSTLO(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_FSTCLUSTLO),v)
|
||||
# define DIR_PUTFILESIZE(p,v) FAT_PUTUINT32(UBYTE_PTR(p,DIR_FILESIZE),v)
|
||||
# define DIR_PUTCRTIME(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_CRTIME),v)
|
||||
# define DIR_PUTCRDATE(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_CRDATE),v)
|
||||
# define DIR_PUTLASTACCDATE(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_LASTACCDATE),v)
|
||||
# define DIR_PUTFSTCLUSTHI(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_FSTCLUSTHI),v)
|
||||
# define DIR_PUTWRTTIME(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_WRTTIME),v)
|
||||
# define DIR_PUTWRTDATE(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_WRTDATE),v)
|
||||
# define DIR_PUTFSTCLUSTLO(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_FSTCLUSTLO),v)
|
||||
# define DIR_PUTFILESIZE(p,v) FAT_PUTUINT32(UBYTE_PTR(p,DIR_FILESIZE),v)
|
||||
|
||||
# ifdef CONFIG_FAT_LFN
|
||||
# define LDIR_PUTWCHAR1(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR1_5),v)
|
||||
@ -565,14 +565,14 @@
|
||||
# define LDIR_PUTWCHAR13(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR12_13+2),v)
|
||||
# endif
|
||||
|
||||
# define FSI_PUTLEADSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_LEADSIG),v)
|
||||
# define FSI_PUTSTRUCTSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_STRUCTSIG),v)
|
||||
# define FSI_PUTFREECOUNT(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_FREECOUNT),v)
|
||||
# define FSI_PUTNXTFREE(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_NXTFREE),v)
|
||||
# define FSI_PUTTRAILSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_TRAILSIG),v)
|
||||
# define FSI_PUTLEADSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_LEADSIG),v)
|
||||
# define FSI_PUTSTRUCTSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_STRUCTSIG),v)
|
||||
# define FSI_PUTFREECOUNT(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_FREECOUNT),v)
|
||||
# define FSI_PUTNXTFREE(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_NXTFREE),v)
|
||||
# define FSI_PUTTRAILSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_TRAILSIG),v)
|
||||
|
||||
# define FAT_PUTFAT16(p,i,v) FAT_PUTUINT16(UBYTE_PTR(p,i),v)
|
||||
# define FAT_PUTFAT32(p,i,v) FAT_PUTUINT32(UBYTE_PTR(p,i),v)
|
||||
# define FAT_PUTFAT16(p,i,v) FAT_PUTUINT16(UBYTE_PTR(p,i),v)
|
||||
# define FAT_PUTFAT32(p,i,v) FAT_PUTUINT32(UBYTE_PTR(p,i),v)
|
||||
|
||||
#else
|
||||
|
||||
@ -580,48 +580,48 @@
|
||||
* to aligned multibyte values.
|
||||
*/
|
||||
|
||||
# define MBR_PUTRESVDSECCOUNT(p,v) UINT16_PUT(p,MBR_RESVDSECCOUNT,v)
|
||||
# define MBR_PUTFATSZ16(p,v) UINT16_PUT(p,MBR_FATSZ16,v)
|
||||
# define MBR_PUTSECPERTRK(p,v) UINT16_PUT(p,MBR_SECPERTRK,v)
|
||||
# define MBR_PUTNUMHEADS(p,v) UINT16_PUT(p,MBR_NUMHEADS,v)
|
||||
# define MBR_PUTHIDSEC(p,v) UINT32_PUT(p,MBR_HIDSEC,v)
|
||||
# define MBR_PUTTOTSEC32(p,v) UINT32_PUT(p,MBR_TOTSEC32,v)
|
||||
# define MBR_PUTFATSZ32(p,v) UINT32_PUT(p,MBR32_FATSZ32,v)
|
||||
# define MBR_PUTEXTFLAGS(p,v) UINT16_PUT(p,MBR32_EXTFLAGS,v)
|
||||
# define MBR_PUTFSVER(p,v) UINT16_PUT(p,MBR32_FSVER,v)
|
||||
# define MBR_PUTROOTCLUS(p,v) UINT32_PUT(p,MBR32_ROOTCLUS,v)
|
||||
# define MBR_PUTFSINFO(p,v) UINT16_PUT(p,MBR32_FSINFO,v)
|
||||
# define MBR_PUTBKBOOTSEC(p,v) UINT16_PUT(p,MBR32_BKBOOTSEC,v)
|
||||
# define MBR_PUTSIGNATURE(p,v) UINT16_PUT(p,MBR_SIGNATURE,v)
|
||||
# define MBR_PUTRESVDSECCOUNT(p,v) UINT16_PUT(p,MBR_RESVDSECCOUNT,v)
|
||||
# define MBR_PUTFATSZ16(p,v) UINT16_PUT(p,MBR_FATSZ16,v)
|
||||
# define MBR_PUTSECPERTRK(p,v) UINT16_PUT(p,MBR_SECPERTRK,v)
|
||||
# define MBR_PUTNUMHEADS(p,v) UINT16_PUT(p,MBR_NUMHEADS,v)
|
||||
# define MBR_PUTHIDSEC(p,v) UINT32_PUT(p,MBR_HIDSEC,v)
|
||||
# define MBR_PUTTOTSEC32(p,v) UINT32_PUT(p,MBR_TOTSEC32,v)
|
||||
# define MBR_PUTFATSZ32(p,v) UINT32_PUT(p,MBR32_FATSZ32,v)
|
||||
# define MBR_PUTEXTFLAGS(p,v) UINT16_PUT(p,MBR32_EXTFLAGS,v)
|
||||
# define MBR_PUTFSVER(p,v) UINT16_PUT(p,MBR32_FSVER,v)
|
||||
# define MBR_PUTROOTCLUS(p,v) UINT32_PUT(p,MBR32_ROOTCLUS,v)
|
||||
# define MBR_PUTFSINFO(p,v) UINT16_PUT(p,MBR32_FSINFO,v)
|
||||
# define MBR_PUTBKBOOTSEC(p,v) UINT16_PUT(p,MBR32_BKBOOTSEC,v)
|
||||
# define MBR_PUTSIGNATURE(p,v) UINT16_PUT(p,MBR_SIGNATURE,v)
|
||||
|
||||
# define FBR_PUTRESVDSECCOUNT(p,v) UINT16_PUT(p,FBR_RESVDSECCOUNT,v)
|
||||
# define FBR_PUTFATSZ16(p,v) UINT16_PUT(p,FBR_FATSZ16,v)
|
||||
# define FBR_PUTSECPERTRK(p,v) UINT16_PUT(p,FBR_SECPERTRK,v)
|
||||
# define FBR_PUTNUMHEADS(p,v) UINT16_PUT(p,FBR_NUMHEADS,v)
|
||||
# define FBR_PUTHIDSEC(p,v) UINT32_PUT(p,FBR_HIDSEC,v)
|
||||
# define FBR_PUTTOTSEC32(p,v) UINT32_PUT(p,FBR_TOTSEC32,v)
|
||||
# define FBR_PUTFATSZ32(p,v) UINT32_PUT(p,FBR_FATSZ32,v)
|
||||
# define FBR_PUTEXTFLAGS(p,v) UINT16_PUT(p,FBR_EXTFLAGS,v)
|
||||
# define FBR_PUTFSVER(p,v) UINT16_PUT(p,FBR_FSVER,v)
|
||||
# define FBR_PUTROOTCLUS(p,v) UINT32_PUT(p,FBR_ROOTCLUS,v)
|
||||
# define FBR_PUTFSINFO(p,v) UINT16_PUT(p,FBR_FSINFO,v)
|
||||
# define FBR_PUTBKBOOTSEC(p,v) UINT16_PUT(p,FBR_BKBOOTSEC,v)
|
||||
# define FBR_PUTSIGNATURE(p,v) UINT16_PUT(p,FBR_SIGNATURE,v)
|
||||
# define FBR_PUTRESVDSECCOUNT(p,v) UINT16_PUT(p,FBR_RESVDSECCOUNT,v)
|
||||
# define FBR_PUTFATSZ16(p,v) UINT16_PUT(p,FBR_FATSZ16,v)
|
||||
# define FBR_PUTSECPERTRK(p,v) UINT16_PUT(p,FBR_SECPERTRK,v)
|
||||
# define FBR_PUTNUMHEADS(p,v) UINT16_PUT(p,FBR_NUMHEADS,v)
|
||||
# define FBR_PUTHIDSEC(p,v) UINT32_PUT(p,FBR_HIDSEC,v)
|
||||
# define FBR_PUTTOTSEC32(p,v) UINT32_PUT(p,FBR_TOTSEC32,v)
|
||||
# define FBR_PUTFATSZ32(p,v) UINT32_PUT(p,FBR_FATSZ32,v)
|
||||
# define FBR_PUTEXTFLAGS(p,v) UINT16_PUT(p,FBR_EXTFLAGS,v)
|
||||
# define FBR_PUTFSVER(p,v) UINT16_PUT(p,FBR_FSVER,v)
|
||||
# define FBR_PUTROOTCLUS(p,v) UINT32_PUT(p,FBR_ROOTCLUS,v)
|
||||
# define FBR_PUTFSINFO(p,v) UINT16_PUT(p,FBR_FSINFO,v)
|
||||
# define FBR_PUTBKBOOTSEC(p,v) UINT16_PUT(p,FBR_BKBOOTSEC,v)
|
||||
# define FBR_PUTSIGNATURE(p,v) UINT16_PUT(p,FBR_SIGNATURE,v)
|
||||
|
||||
# define FSI_PUTLEADSIG(p,v) UINT32_PUT(p,FSI_LEADSIG,v)
|
||||
# define FSI_PUTSTRUCTSIG(p,v) UINT32_PUT(p,FSI_STRUCTSIG,v)
|
||||
# define FSI_PUTFREECOUNT(p,v) UINT32_PUT(p,FSI_FREECOUNT,v)
|
||||
# define FSI_PUTNXTFREE(p,v) UINT32_PUT(p,FSI_NXTFREE,v)
|
||||
# define FSI_PUTTRAILSIG(p,v) UINT32_PUT(p,FSI_TRAILSIG,v)
|
||||
# define FSI_PUTLEADSIG(p,v) UINT32_PUT(p,FSI_LEADSIG,v)
|
||||
# define FSI_PUTSTRUCTSIG(p,v) UINT32_PUT(p,FSI_STRUCTSIG,v)
|
||||
# define FSI_PUTFREECOUNT(p,v) UINT32_PUT(p,FSI_FREECOUNT,v)
|
||||
# define FSI_PUTNXTFREE(p,v) UINT32_PUT(p,FSI_NXTFREE,v)
|
||||
# define FSI_PUTTRAILSIG(p,v) UINT32_PUT(p,FSI_TRAILSIG,v)
|
||||
|
||||
# define DIR_PUTCRTIME(p,v) UINT16_PUT(p,DIR_CRTIME,v)
|
||||
# define DIR_PUTCRDATE(p,v) UINT16_PUT(p,DIR_CRDATE,v)
|
||||
# define DIR_PUTLASTACCDATE(p,v) UINT16_PUT(p,DIR_LASTACCDATE,v)
|
||||
# define DIR_PUTFSTCLUSTHI(p,v) UINT16_PUT(p,DIR_FSTCLUSTHI,v)
|
||||
# define DIR_PUTWRTTIME(p,v) UINT16_PUT(p,DIR_WRTTIME,v)
|
||||
# define DIR_PUTWRTDATE(p,v) UINT16_PUT(p,DIR_WRTDATE,v)
|
||||
# define DIR_PUTFSTCLUSTLO(p,v) UINT16_PUT(p,DIR_FSTCLUSTLO,v)
|
||||
# define DIR_PUTFILESIZE(p,v) UINT32_PUT(p,DIR_FILESIZE,v)
|
||||
# define DIR_PUTCRTIME(p,v) UINT16_PUT(p,DIR_CRTIME,v)
|
||||
# define DIR_PUTCRDATE(p,v) UINT16_PUT(p,DIR_CRDATE,v)
|
||||
# define DIR_PUTLASTACCDATE(p,v) UINT16_PUT(p,DIR_LASTACCDATE,v)
|
||||
# define DIR_PUTFSTCLUSTHI(p,v) UINT16_PUT(p,DIR_FSTCLUSTHI,v)
|
||||
# define DIR_PUTWRTTIME(p,v) UINT16_PUT(p,DIR_WRTTIME,v)
|
||||
# define DIR_PUTWRTDATE(p,v) UINT16_PUT(p,DIR_WRTDATE,v)
|
||||
# define DIR_PUTFSTCLUSTLO(p,v) UINT16_PUT(p,DIR_FSTCLUSTLO,v)
|
||||
# define DIR_PUTFILESIZE(p,v) UINT32_PUT(p,DIR_FILESIZE,v)
|
||||
|
||||
# ifdef CONFIG_FAT_LFN
|
||||
# define LDIR_PUTWCHAR1(p,v) UINT16_PUT(p,LDIR_WCHAR1_5,v)
|
||||
@ -639,14 +639,14 @@
|
||||
# define LDIR_PUTWCHAR13(p,v) UINT16_PUT(p,LDIR_WCHAR12_13+2,v)
|
||||
# endif
|
||||
|
||||
# define FSI_PUTLEADSIG(p,v) UINT32_PUT(p,FSI_LEADSIG,v)
|
||||
# define FSI_PUTSTRUCTSIG(p,v) UINT32_PUT(p,FSI_STRUCTSIG,v)
|
||||
# define FSI_PUTFREECOUNT(p,v) UINT32_PUT(p,FSI_FREECOUNT,v)
|
||||
# define FSI_PUTNXTFREE(p,v) UINT32_PUT(p,FSI_NXTFREE,v)
|
||||
# define FSI_PUTTRAILSIG(p,v) UINT32_PUT(p,FSI_TRAILSIG,v)
|
||||
# define FSI_PUTLEADSIG(p,v) UINT32_PUT(p,FSI_LEADSIG,v)
|
||||
# define FSI_PUTSTRUCTSIG(p,v) UINT32_PUT(p,FSI_STRUCTSIG,v)
|
||||
# define FSI_PUTFREECOUNT(p,v) UINT32_PUT(p,FSI_FREECOUNT,v)
|
||||
# define FSI_PUTNXTFREE(p,v) UINT32_PUT(p,FSI_NXTFREE,v)
|
||||
# define FSI_PUTTRAILSIG(p,v) UINT32_PUT(p,FSI_TRAILSIG,v)
|
||||
|
||||
# define FAT_PUTFAT16(p,i,v) UINT16_PUT(p,i,v)
|
||||
# define FAT_PUTFAT32(p,i,v) UINT32_PUT(p,i,v)
|
||||
# define FAT_PUTFAT16(p,i,v) UINT16_PUT(p,i,v)
|
||||
# define FAT_PUTFAT32(p,i,v) UINT32_PUT(p,i,v)
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -61,10 +61,10 @@
|
||||
/* Internal macros for attributes */
|
||||
|
||||
#ifndef max
|
||||
# define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
# define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef min
|
||||
# define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
# define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define DIVROUND(num, divisor) ((num) + ((divisor) >> 1)) / (divisor)
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
#ifdef CONFIG_PDCURSES_CHTYPE_LONG
|
||||
|
||||
# define A(x) ((chtype)x | A_ALTCHARSET)
|
||||
# define A(x) ((chtype)x | A_ALTCHARSET)
|
||||
|
||||
chtype acs_map[128] =
|
||||
{
|
||||
|
@ -67,9 +67,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PDCURSES_CHTYPE_LONG
|
||||
# define PDC_COLOR_PAIRS 256
|
||||
# define PDC_COLOR_PAIRS 256
|
||||
#else
|
||||
# define PDC_COLOR_PAIRS 32
|
||||
# define PDC_COLOR_PAIRS 32
|
||||
#endif
|
||||
|
||||
#define BUTTON_RELEASED 0x0000
|
||||
@ -163,14 +163,14 @@
|
||||
#define REPORT_MOUSE_POSITION 0x20000000L
|
||||
|
||||
#ifdef NCURSES_MOUSE_VERSION
|
||||
# define BUTTON_SHIFT BUTTON_MODIFIER_SHIFT
|
||||
# define BUTTON_CONTROL BUTTON_MODIFIER_CONTROL
|
||||
# define BUTTON_CTRL BUTTON_MODIFIER_CONTROL
|
||||
# define BUTTON_ALT BUTTON_MODIFIER_ALT
|
||||
# define BUTTON_SHIFT BUTTON_MODIFIER_SHIFT
|
||||
# define BUTTON_CONTROL BUTTON_MODIFIER_CONTROL
|
||||
# define BUTTON_CTRL BUTTON_MODIFIER_CONTROL
|
||||
# define BUTTON_ALT BUTTON_MODIFIER_ALT
|
||||
#else
|
||||
# define BUTTON_SHIFT PDC_BUTTON_SHIFT
|
||||
# define BUTTON_CONTROL PDC_BUTTON_CONTROL
|
||||
# define BUTTON_ALT PDC_BUTTON_ALT
|
||||
# define BUTTON_SHIFT PDC_BUTTON_SHIFT
|
||||
# define BUTTON_CONTROL PDC_BUTTON_CONTROL
|
||||
# define BUTTON_ALT PDC_BUTTON_ALT
|
||||
#endif
|
||||
|
||||
/* PDCurses Text Attributes
|
||||
|
@ -60,9 +60,9 @@
|
||||
#endif
|
||||
|
||||
#if CONFIG_RR_INTERVAL > 0
|
||||
# define SCHED_NSH SCHED_RR
|
||||
# define SCHED_NSH SCHED_RR
|
||||
#else
|
||||
# define SCHED_NSH SCHED_FIFO
|
||||
# define SCHED_NSH SCHED_FIFO
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -337,7 +337,7 @@ static inline void dhcpd_arpupdate(FAR uint8_t *ipaddr, FAR uint8_t *hwaddr)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NETUTILS_DHCPD_HOST
|
||||
# define dhcpd_time() time(0)
|
||||
# define dhcpd_time() time(0)
|
||||
#elif defined(HAVE_LEASE_TIME)
|
||||
static time_t dhcpd_time(void)
|
||||
{
|
||||
@ -352,7 +352,7 @@ static time_t dhcpd_time(void)
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
# define dhcpd_time() (0)
|
||||
# define dhcpd_time() (0)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -373,7 +373,7 @@ static inline bool dhcpd_leaseexpired(struct lease_s *lease)
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define dhcpd_leaseexpired(lease) (false)
|
||||
# define dhcpd_leaseexpired(lease) (false)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -41,7 +41,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef NETCAT_PORT
|
||||
# define NETCAT_PORT 31337
|
||||
# define NETCAT_PORT 31337
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -173,9 +173,9 @@ extern ssize_t tftp_sendto(int sd, const void *buf,
|
||||
size_t len, struct sockaddr_in *to);
|
||||
|
||||
#ifdef CONFIG_NETUTILS_TFTP_DUMPBUFFERS
|
||||
# define tftp_dumpbuffer(msg, buffer, nbytes) ninfodumpbuffer(msg, buffer, nbytes)
|
||||
# define tftp_dumpbuffer(msg, buffer, nbytes) ninfodumpbuffer(msg, buffer, nbytes)
|
||||
#else
|
||||
# define tftp_dumpbuffer(msg, buffer, nbytes)
|
||||
# define tftp_dumpbuffer(msg, buffer, nbytes)
|
||||
#endif
|
||||
|
||||
#endif /* __APPS_NETUTILS_TFTP_TFTPC_INTERNAL_H */
|
||||
|
@ -204,7 +204,7 @@ static void httpd_dumpbuffer(FAR const char *msg, FAR const char *buffer,
|
||||
ninfodumpbuffer(msg, (FAR const uint8_t *)buffer, nbytes);
|
||||
}
|
||||
#else
|
||||
# define httpd_dumpbuffer(msg,buffer,nbytes)
|
||||
# define httpd_dumpbuffer(msg,buffer,nbytes)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NETUTILS_HTTPD_DUMPPSTATE
|
||||
@ -223,7 +223,7 @@ static void httpd_dumppstate(struct httpd_state *pstate, const char *msg)
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
# define httpd_dumppstate(pstate, msg)
|
||||
# define httpd_dumppstate(pstate, msg)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE
|
||||
|
@ -416,7 +416,7 @@
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NSH_NESTDEPTH
|
||||
# define CONFIG_NSH_NESTDEPTH 3
|
||||
# define CONFIG_NSH_NESTDEPTH 3
|
||||
#endif
|
||||
|
||||
/* Define to enable dumping of all input/output buffers */
|
||||
@ -426,7 +426,7 @@
|
||||
/* Make sure that the home directory is defined */
|
||||
|
||||
#ifndef CONFIG_LIBC_HOMEDIR
|
||||
# define CONFIG_LIBC_HOMEDIR "/"
|
||||
# define CONFIG_LIBC_HOMEDIR "/"
|
||||
#endif
|
||||
|
||||
#undef NSH_HAVE_VARS
|
||||
|
@ -51,11 +51,11 @@
|
||||
#define nsh_exit(v,s) (v)->exit(v,s)
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define nsh_error(v, ...) (v)->error(v, ##__VA_ARGS__)
|
||||
# define nsh_output(v, ...) (v)->output(v, ##__VA_ARGS__)
|
||||
# define nsh_error(v, ...) (v)->error(v, ##__VA_ARGS__)
|
||||
# define nsh_output(v, ...) (v)->output(v, ##__VA_ARGS__)
|
||||
#else
|
||||
# define nsh_error vtbl->error
|
||||
# define nsh_output vtbl->output
|
||||
# define nsh_error vtbl->error
|
||||
# define nsh_output vtbl->output
|
||||
#endif
|
||||
|
||||
/* Size of info to be saved in call to nsh_redirect
|
||||
|
@ -167,7 +167,7 @@ static inline void net_statistics(FAR struct nsh_vtbl_s *vtbl)
|
||||
nsh_catfile(vtbl, "ifconfig", CONFIG_NSH_PROC_MOUNTPOINT "/net/stat");
|
||||
}
|
||||
#else
|
||||
# define net_statistics(vtbl)
|
||||
# define net_statistics(vtbl)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -98,7 +98,7 @@ static void show_memory_usage(struct mallinfo *mmbefore,
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define show_memory_usage(mm1, mm2)
|
||||
# define show_memory_usage(mm1, mm2)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -112,7 +112,7 @@
|
||||
|
||||
/* Output is via printf but can be changed using this macro */
|
||||
|
||||
# define i2c_output printf
|
||||
# define i2c_output printf
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
@ -115,7 +115,7 @@
|
||||
|
||||
/* Output is via printf but can be changed using this macro */
|
||||
|
||||
# define spi_output printf
|
||||
# define spi_output printf
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
@ -129,9 +129,9 @@ typedef uint64_t orb_abstime;
|
||||
* @param name The name of the topic.
|
||||
*/
|
||||
#if defined(__cplusplus)
|
||||
# define ORB_DECLARE(name) extern "C" const struct orb_metadata g_orb_##name
|
||||
# define ORB_DECLARE(name) extern "C" const struct orb_metadata g_orb_##name
|
||||
#else
|
||||
# define ORB_DECLARE(name) extern const struct orb_metadata g_orb_##name
|
||||
# define ORB_DECLARE(name) extern const struct orb_metadata g_orb_##name
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -123,7 +123,7 @@ static void show_memory_usage(struct mallinfo *mmbefore,
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define show_memory_usage(mm1, mm2)
|
||||
# define show_memory_usage(mm1, mm2)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -33,11 +33,11 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_HAVE_FUNCTIONNAME
|
||||
# define EXTRA_FMT "%s: "
|
||||
# define EXTRA_ARG ,__FUNCTION__
|
||||
# define EXTRA_FMT "%s: "
|
||||
# define EXTRA_ARG ,__FUNCTION__
|
||||
#else
|
||||
# define EXTRA_FMT
|
||||
# define EXTRA_ARG
|
||||
# define EXTRA_FMT
|
||||
# define EXTRA_ARG
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/compiler.h
|
||||
* apps/system/zmodem/host/nuttx/compiler.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@ -35,17 +35,17 @@
|
||||
|
||||
/* Pre-processor */
|
||||
|
||||
# define CONFIG_CPP_HAVE_VARARGS 1 /* Supports variable argument macros */
|
||||
# define CONFIG_CPP_HAVE_WARNING 1 /* Supports #warning */
|
||||
# define CONFIG_CPP_HAVE_VARARGS 1 /* Supports variable argument macros */
|
||||
# define CONFIG_CPP_HAVE_WARNING 1 /* Supports #warning */
|
||||
|
||||
/* Intriniscs */
|
||||
|
||||
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
|
||||
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
|
||||
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
|
||||
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
|
||||
|
||||
/* Indicate that a local variable is not used */
|
||||
|
||||
# define UNUSED(a) ((void)(a))
|
||||
# define UNUSED(a) ((void)(a))
|
||||
|
||||
/* Attributes
|
||||
*
|
||||
@ -68,45 +68,45 @@
|
||||
|
||||
/* The noreturn attribute informs GCC that the function will not return. */
|
||||
|
||||
# define noreturn_function __attribute__ ((noreturn))
|
||||
# define noreturn_function __attribute__ ((noreturn))
|
||||
|
||||
/* The farcall_function attribute informs GCC that is should use long calls
|
||||
* (even though -mlong-calls does not appear in the compilation options)
|
||||
*/
|
||||
|
||||
# define farcall_function __attribute__ ((long_call))
|
||||
# define farcall_function __attribute__ ((long_call))
|
||||
|
||||
/* The packed attribute informs GCC that the structure elements are packed,
|
||||
* ignoring other alignment rules.
|
||||
*/
|
||||
|
||||
# define begin_packed_struct
|
||||
# define end_packed_struct __attribute__ ((packed))
|
||||
# define begin_packed_struct
|
||||
# define end_packed_struct __attribute__ ((packed))
|
||||
|
||||
/* GCC does not support the reentrant attribute */
|
||||
|
||||
# define reentrant_function
|
||||
# define reentrant_function
|
||||
|
||||
/* The naked attribute informs GCC that the programmer will take care of
|
||||
* the function prolog and epilog.
|
||||
*/
|
||||
|
||||
# define naked_function __attribute__ ((naked,no_instrument_function))
|
||||
# define naked_function __attribute__ ((naked,no_instrument_function))
|
||||
|
||||
/* The inline_function attribute informs GCC that the function should always
|
||||
* be inlined, regardless of the level of optimization. The
|
||||
* noinline_function indicates that the function should never be inlined.
|
||||
*/
|
||||
|
||||
# define inline_function __attribute__ ((always_inline,no_instrument_function))
|
||||
# define noinline_function __attribute__ ((noinline))
|
||||
# define inline_function __attribute__ ((always_inline,no_instrument_function))
|
||||
# define noinline_function __attribute__ ((noinline))
|
||||
|
||||
/* GCC has does not use storage classes to qualify addressing */
|
||||
|
||||
# define FAR
|
||||
# define NEAR
|
||||
# define DSEG
|
||||
# define CODE
|
||||
# define FAR
|
||||
# define NEAR
|
||||
# define DSEG
|
||||
# define CODE
|
||||
|
||||
/* Handle cases where sizeof(int) is 16-bits, sizeof(long) is 32-bits, and
|
||||
* pointers are 16-bits.
|
||||
@ -115,16 +115,16 @@
|
||||
#if defined(__m32c__)
|
||||
/* No I-space access qualifiers */
|
||||
|
||||
# define IOBJ
|
||||
# define IPTR
|
||||
# define IOBJ
|
||||
# define IPTR
|
||||
|
||||
/* Select the small, 16-bit addressing model */
|
||||
|
||||
# define CONFIG_SMALL_MEMORY 1
|
||||
# define CONFIG_SMALL_MEMORY 1
|
||||
|
||||
/* Long and int are not the same size */
|
||||
|
||||
# define CONFIG_LONG_IS_NOT_INT 1
|
||||
# define CONFIG_LONG_IS_NOT_INT 1
|
||||
|
||||
/* Pointers and int are the same size */
|
||||
|
||||
@ -146,11 +146,11 @@
|
||||
|
||||
/* Select the small, 16-bit addressing model (for D-Space) */
|
||||
|
||||
# define CONFIG_SMALL_MEMORY 1
|
||||
# define CONFIG_SMALL_MEMORY 1
|
||||
|
||||
/* Long and int are not the same size */
|
||||
|
||||
# define CONFIG_LONG_IS_NOT_INT 1
|
||||
# define CONFIG_LONG_IS_NOT_INT 1
|
||||
|
||||
/* Pointers and int are the same size */
|
||||
|
||||
@ -165,12 +165,12 @@
|
||||
#elif defined(__mc68hc1x__)
|
||||
/* No I-space access qualifiers */
|
||||
|
||||
# define IOBJ
|
||||
# define IPTR
|
||||
# define IOBJ
|
||||
# define IPTR
|
||||
|
||||
/* Select the small, 16-bit addressing model */
|
||||
|
||||
# define CONFIG_SMALL_MEMORY 1
|
||||
# define CONFIG_SMALL_MEMORY 1
|
||||
|
||||
/* Normally, mc68hc1x code is compiled with the -mshort option
|
||||
* which results in a 16-bit integer. If -mnoshort is defined
|
||||
@ -199,8 +199,8 @@
|
||||
|
||||
/* No I-space access qualifiers */
|
||||
|
||||
# define IOBJ
|
||||
# define IPTR
|
||||
# define IOBJ
|
||||
# define IPTR
|
||||
|
||||
/* Select the large, 32-bit addressing model */
|
||||
|
||||
@ -217,10 +217,10 @@
|
||||
|
||||
/* GCC supports both types double and long long */
|
||||
|
||||
# define CONFIG_HAVE_LONG_LONG 1
|
||||
# define CONFIG_HAVE_FLOAT 1
|
||||
# define CONFIG_HAVE_DOUBLE 1
|
||||
# define CONFIG_HAVE_LONG_DOUBLE 1
|
||||
# define CONFIG_HAVE_LONG_LONG 1
|
||||
# define CONFIG_HAVE_FLOAT 1
|
||||
# define CONFIG_HAVE_DOUBLE 1
|
||||
# define CONFIG_HAVE_LONG_DOUBLE 1
|
||||
|
||||
/* SDCC-specific definitions ************************************************/
|
||||
|
||||
@ -228,13 +228,13 @@
|
||||
|
||||
/* Pre-processor */
|
||||
|
||||
# define CONFIG_CPP_HAVE_VARARGS 1 /* Supports variable argument macros */
|
||||
# define CONFIG_CPP_HAVE_WARNING 1 /* Supports #warning */
|
||||
# define CONFIG_CPP_HAVE_VARARGS 1 /* Supports variable argument macros */
|
||||
# define CONFIG_CPP_HAVE_WARNING 1 /* Supports #warning */
|
||||
|
||||
/* Intriniscs */
|
||||
|
||||
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
|
||||
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
|
||||
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
|
||||
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
|
||||
|
||||
/* Pragmas
|
||||
*
|
||||
@ -249,36 +249,36 @@
|
||||
*/
|
||||
|
||||
# undef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
# define weak_alias(name, aliasname)
|
||||
# define weak_function
|
||||
# define weak_const_function
|
||||
# define restrict /* REVISIT */
|
||||
# define weak_alias(name, aliasname)
|
||||
# define weak_function
|
||||
# define weak_const_function
|
||||
# define restrict /* REVISIT */
|
||||
|
||||
/* SDCC does not support the noreturn or packed attributes */
|
||||
|
||||
# define noreturn_function
|
||||
# define begin_packed_struct
|
||||
# define end_packed_struct
|
||||
# define noreturn_function
|
||||
# define begin_packed_struct
|
||||
# define end_packed_struct
|
||||
|
||||
/* REVISIT: */
|
||||
|
||||
# define farcall_function
|
||||
# define farcall_function
|
||||
|
||||
/* SDCC does support "naked" functions */
|
||||
|
||||
# define naked_function __naked
|
||||
# define naked_function __naked
|
||||
|
||||
/* SDCC does not support forced inlining. */
|
||||
|
||||
# define inline_function
|
||||
# define noinline_function
|
||||
# define inline_function
|
||||
# define noinline_function
|
||||
|
||||
/* The reentrant attribute informs SDCC that the function
|
||||
* must be reentrant. In this case, SDCC will store input
|
||||
* arguments on the stack to support reentrancy.
|
||||
*/
|
||||
|
||||
# define reentrant_function __reentrant
|
||||
# define reentrant_function __reentrant
|
||||
|
||||
/* It is assumed that the system is build using the small
|
||||
* data model with storage defaulting to internal RAM.
|
||||
@ -305,24 +305,24 @@
|
||||
|
||||
/* Select small, 16-bit address model */
|
||||
|
||||
# define CONFIG_SMALL_MEMORY 1
|
||||
# define CONFIG_SMALL_MEMORY 1
|
||||
|
||||
/* Long and int are not the same size */
|
||||
|
||||
# define CONFIG_LONG_IS_NOT_INT 1
|
||||
# define CONFIG_LONG_IS_NOT_INT 1
|
||||
|
||||
/* The generic pointer and int are not the same size
|
||||
* (for some SDCC architectures)
|
||||
*/
|
||||
|
||||
#if !defined(__z80) && !defined(__gbz80)
|
||||
# define CONFIG_PTR_IS_NOT_INT 1
|
||||
# define CONFIG_PTR_IS_NOT_INT 1
|
||||
#endif
|
||||
|
||||
/* SDCC does not support type long long or type double */
|
||||
|
||||
# undef CONFIG_HAVE_LONG_LONG
|
||||
# define CONFIG_HAVE_FLOAT 1
|
||||
# define CONFIG_HAVE_FLOAT 1
|
||||
# undef CONFIG_HAVE_DOUBLE
|
||||
# undef CONFIG_HAVE_LONG_DOUBLE
|
||||
|
||||
@ -343,13 +343,13 @@
|
||||
|
||||
/* Intrinsics */
|
||||
|
||||
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
|
||||
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
|
||||
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
|
||||
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
|
||||
|
||||
/* No I-space access qualifiers */
|
||||
|
||||
# define IOBJ
|
||||
# define IPTR
|
||||
# define IOBJ
|
||||
# define IPTR
|
||||
|
||||
/* Attributes
|
||||
*
|
||||
@ -357,29 +357,29 @@
|
||||
*/
|
||||
|
||||
# undef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
# define weak_alias(name, aliasname)
|
||||
# define weak_function
|
||||
# define weak_const_function
|
||||
# define restrict
|
||||
# define weak_alias(name, aliasname)
|
||||
# define weak_function
|
||||
# define weak_const_function
|
||||
# define restrict
|
||||
|
||||
/* The Zilog compiler does not support the noreturn, packed, naked
|
||||
* attributes.
|
||||
*/
|
||||
|
||||
# define noreturn_function
|
||||
# define begin_packed_struct
|
||||
# define end_packed_struct
|
||||
# define naked_function
|
||||
# define inline_function
|
||||
# define noinline_function
|
||||
# define noreturn_function
|
||||
# define begin_packed_struct
|
||||
# define end_packed_struct
|
||||
# define naked_function
|
||||
# define inline_function
|
||||
# define noinline_function
|
||||
|
||||
/* REVISIT: */
|
||||
|
||||
# define farcall_function
|
||||
# define farcall_function
|
||||
|
||||
/* The Zilog compiler does not support the reentrant attribute */
|
||||
|
||||
# define reentrant_function
|
||||
# define reentrant_function
|
||||
|
||||
/* Addressing.
|
||||
*
|
||||
@ -430,7 +430,7 @@
|
||||
*/
|
||||
|
||||
# undef CONFIG_HAVE_LONG_LONG
|
||||
# define CONFIG_HAVE_FLOAT 1
|
||||
# define CONFIG_HAVE_FLOAT 1
|
||||
# undef CONFIG_HAVE_DOUBLE
|
||||
# undef CONFIG_HAVE_LONG_DOUBLE
|
||||
|
||||
@ -438,34 +438,34 @@
|
||||
|
||||
#elif defined(__ICCARM__)
|
||||
|
||||
# define CONFIG_CPP_HAVE_VARARGS 1 /* Supports variable argument macros */
|
||||
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
|
||||
# define CONFIG_HAVE_FLOAT 1
|
||||
# define CONFIG_CPP_HAVE_VARARGS 1 /* Supports variable argument macros */
|
||||
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
|
||||
# define CONFIG_HAVE_FLOAT 1
|
||||
|
||||
/* Indicate that a local variable is not used */
|
||||
|
||||
# define UNUSED(a) ((void)(a))
|
||||
# define UNUSED(a) ((void)(a))
|
||||
|
||||
# define weak_alias(name, aliasname)
|
||||
# define weak_function __weak
|
||||
# define weak_const_function
|
||||
# define noreturn_function
|
||||
# define farcall_function
|
||||
# define begin_packed_struct __packed
|
||||
# define end_packed_struct
|
||||
# define reentrant_function
|
||||
# define naked_function
|
||||
# define inline_function
|
||||
# define noinline_function
|
||||
# define weak_alias(name, aliasname)
|
||||
# define weak_function __weak
|
||||
# define weak_const_function
|
||||
# define noreturn_function
|
||||
# define farcall_function
|
||||
# define begin_packed_struct __packed
|
||||
# define end_packed_struct
|
||||
# define reentrant_function
|
||||
# define naked_function
|
||||
# define inline_function
|
||||
# define noinline_function
|
||||
|
||||
# define FAR
|
||||
# define NEAR
|
||||
# define DSEG
|
||||
# define CODE
|
||||
# define IPTR
|
||||
# define FAR
|
||||
# define NEAR
|
||||
# define DSEG
|
||||
# define CODE
|
||||
# define IPTR
|
||||
|
||||
# define __asm__ asm
|
||||
# define __volatile__ volatile
|
||||
# define __asm__ asm
|
||||
# define __volatile__ volatile
|
||||
|
||||
/* For operatots __sfb() and __sfe() */
|
||||
|
||||
@ -484,29 +484,29 @@
|
||||
# undef CONFIG_HAVE_FUNCTIONNAME
|
||||
# undef CONFIG_HAVE_FILENAME
|
||||
# undef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
# define weak_alias(name, aliasname)
|
||||
# define weak_function
|
||||
# define weak_const_function
|
||||
# define restrict
|
||||
# define noreturn_function
|
||||
# define farcall_function
|
||||
# define begin_packed_struct
|
||||
# define end_packed_struct
|
||||
# define reentrant_function
|
||||
# define naked_function
|
||||
# define inline_function
|
||||
# define noinline_function
|
||||
# define weak_alias(name, aliasname)
|
||||
# define weak_function
|
||||
# define weak_const_function
|
||||
# define restrict
|
||||
# define noreturn_function
|
||||
# define farcall_function
|
||||
# define begin_packed_struct
|
||||
# define end_packed_struct
|
||||
# define reentrant_function
|
||||
# define naked_function
|
||||
# define inline_function
|
||||
# define noinline_function
|
||||
|
||||
# define FAR
|
||||
# define NEAR
|
||||
# define DSEG
|
||||
# define CODE
|
||||
# define FAR
|
||||
# define NEAR
|
||||
# define DSEG
|
||||
# define CODE
|
||||
|
||||
# undef CONFIG_SMALL_MEMORY
|
||||
# undef CONFIG_LONG_IS_NOT_INT
|
||||
# undef CONFIG_PTR_IS_NOT_INT
|
||||
# undef CONFIG_HAVE_LONG_LONG
|
||||
# define CONFIG_HAVE_FLOAT 1
|
||||
# define CONFIG_HAVE_FLOAT 1
|
||||
# undef CONFIG_HAVE_DOUBLE
|
||||
# undef CONFIG_HAVE_LONG_DOUBLE
|
||||
|
||||
|
@ -204,7 +204,7 @@ static void show_environment(bool var1_valid, bool var2_valid,
|
||||
show_variable(g_var3_name, g_var3_value, var3_valid);
|
||||
}
|
||||
#else
|
||||
# define show_environment()
|
||||
# define show_environment()
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -54,9 +54,9 @@
|
||||
/* #define GS2200M_TRACE */
|
||||
|
||||
#ifdef GS2200M_TRACE
|
||||
# define gs2200m_printf(v, ...) printf(v, ##__VA_ARGS__)
|
||||
# define gs2200m_printf(v, ...) printf(v, ##__VA_ARGS__)
|
||||
#else
|
||||
# define gs2200m_printf(v, ...)
|
||||
# define gs2200m_printf(v, ...)
|
||||
#endif
|
||||
|
||||
#define SOCKET_BASE 10000
|
||||
|
Loading…
x
Reference in New Issue
Block a user