📄 logic.h
字号:
/* ATmega103 logic.h file
Author : Robert Stuart
Company : PDL Industries
Date of Creation : 6 September 1999
*/
/* defines */
#define TRUE 255
#define UNSIGNED_INT_LIMIT 0xFFFF
#define CHARACTER_NULL 0x00
/* 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)
#define MINIMUM(x, y) (x < y ? x : y)
/* if true then the eeprom is executing a pervious write and can not be interrupted */
#define EEPROM_BUSY (EECR & BIT(EEWE))
/* entering sleep mode */
#define SLEEP asm("SLEEP")
/* reset watchdog */
#define WDR asm("WDR")
/* enable global interrupts */
#define GIE (SREG |= BIT(7))
/* disable global interrupts */
#define GID (SREG &= ~BIT(7))
/* constants used for timing */
#define _1SEC 1000
#define _1MS_INTERRUPT 6000
#define _500MS 500
#define _50MS 50
#define _20MS 20
/* defines from button.h */
#define BUTTON_RESET 0x01
#define BUTTON_SINGLE 0x02
#define BUTTON_HOLD 0x04
/* defines from lcd.h */
#define LINE1 1
#define LINE2 2
#define LINE1_AND_LINE2 3
#define CHARACTER_NULL 0x00
#define CHARACTER_C 0x43
#define CHARACTER_F 0x46
#define CHARACTER_BRACKET 0x5D
#define CHARACTER_BLANK 0x60
#define CHARACTER_ARROW 0x7E
#define CHARACTER_SPACE 0x20
#define CHARACTER_DEGREE 0xDF
#define CHARACTER_BLOCK 0xFF
/* defines from power.h */
#define POWER_RESET 0x00
#define POWER_OK 0x01
#define POWER_SCREENSAVER 0x02
#define POWER_SAVE 0x04
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -