logic.~h

来自「使用iccavr的例子」· ~H 代码 · 共 37 行

~H
37
字号
/* ATmega103 logic.h file 

   Author : Robert Stuart 
   Company : PDL Industries Ltd 
   Date of Creation : 13 April 2000
*/

/* defines */
#define TRUE 	     	   1

/* enables an unsigned char to be used as a series of booleans */
#define BIT(x)	        	   (1 << (x))
#define SETBIT(x, y)   	   (x |= y)
#define CLEARBIT(x, y) 	   (x &= ~y)
#define CHECKBIT(x, y) 	   (x & y)

/* reset watchdog */
#define WDR       	   	   asm("WDR")

/* enable global interrupts */
#define GIE      	        	   (SREG |= BIT(7))

/* disable global interrupts */
#define GID       	         	   (SREG &= ~BIT(7))

/* time constanst */
#define _1MS_INTERRUPT           6000
#define _1000MS 	   	   1000
#define _50MS 	   	   50
#define _20MS		   20

/* defines from lcd.h */
#define LINE1 		   1
#define LINE2 		   2
#define LINE1_AND_LINE2 	   3
#define CHARACTER_NULL	   0x00
#define CHARACTER_SPACE	   0x20

⌨️ 快捷键说明

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