generic.h

来自「PIC MMC and FAT Sample code」· C头文件 代码 · 共 55 行

H
55
字号
//	generic.h
//		- Contains generic definitions that should be applicable to all codes.

// COMPILER DEFINITIONS
//	Pre-Processor	
//	Directive			Description
//	===================================================
//	#CASE					Will cause the compiler to be case sensitive.  
//							By default the compiler is case insensitive.
// #OPT n				n varies from 0-9. Sets the optimization level. Defualt is 9.
//	#PRIORITY ints		ints is a list comma-delimited interrupts.
//							Sets interrupt priority in descending order.	

// LOGIC DEFINITIONS
//#DEFINE NULL		0
#DEFINE FALSE		0
#DEFINE TRUE		1
#DEFINE LOW			0
#DEFINE HIGH		1
#DEFINE DISABLE	0
#DEFINE ENABLE		1

//	DATATYPE DEFINITIONS
//	Type	Description
//	================================================
//	int1	Defines a 1 bit number. 
//	int8	Defines an 8 bit number.
//	int16	Defines a 16 bit number.
//	int32	Defines a 32 bit number.
// char	Same as int8.
// float	Same as int32.
// void	Indicates no specific type.
#DEFINE BOOLEAN	int1
#DEFINE BOOL		BOOLEAN
#DEFINE BYTE		int8
#DEFINE WORD		int16
#DEFINE DWORD		int32
#TYPE short=1, int=8, long=16
#DEFINE INTEGER	int8

// STRING FUNCTION DEFINITIONS
#DEFINE getc getch
#DEFINE getchar getch
#DEFINE putc putchar

// ASCII CONTROL CODES
#DEFINE	ASCII_SOH	0x01
#DEFINE	ASCII_EOT	0x04
#DEFINE	ASCII_ACK	0x06
#DEFINE	ASCII_NAK	0x15




⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?