📄 self_def.h
字号:
#ifndef self_def_h
#define self_def_h
#define uchar unsigned char
//#define HiBIT(x) (x)/256
//#define LowBIT(x) (x)%256
//#define BAUD 4800
//#define F_CPU 1000000
#define sei() SREG|=(1<<SREG_I)
//#define uint16 unsigned int
//disable all interrupts
#define cli() __asm__ __volatile__("cli"::)
//null
#define NOP() __asm__ __volatile__("nop\n\t")
//液晶显示相关控制信号定义
#define E1_H PORTB|=(1<<PB0)
#define E1_L PORTB&=~(1<<PB0)
#define E2_H PORTB|=(1<<PB1)
#define E2_L PORTB&=~(1<<PB1)
#define EN_READ PORTB|=(1<<PB4) //读信号使能
#define EN_WRITE PORTB&=~(1<<PB4) //写信号使能
#define EN_DATA PORTD|=(1<<PD4) //输出数据有效,DI
#define EN_INS PORTD&=~(1<<PD4) //输出指令有效,DI
//FLASH相关控制信号定义
//#define K9FRB_H PORTB|=(1<<PB5)
//#define K9FRB_L PORTB&=~(1<<PB5)
#define K9FRB !(PORTB&=(1<<PB5))
#define K9FCE_H PORTB|=(1<<PB6)
#define K9FCE_L PORTB&=~(1<<PB6)
#define K9FCLE_H PORTB|=(1<<PB7)
#define K9FCLE_L PORTB&=~(1<<PB7)
#define WR_H PORTD|=(1<<PD6)
#define WR_L PORTD&=~(1<<PD6)
#define RD_H PORTD|=(1<<PD7)
#define RD_L PORTD&=~(1<<PD7)
#define ALE_H PORTE|=(1<<PE1)
#define ALE_L PORTE&=~(1<<PE1)
//E531相关控制信号定义
#define WEAKUP_H PORTD|=(1<<PD5)
#define WEAKUP_L PORTD&=~(1<<PD5)
/***************************
#define WR_H PORTD|=(1<<PD6)
#define WR_L PORTD&=~(1<<PD6)
#define RD_H PORTD|=(1<<PD7)
#define RD_L PORTD&=~(1<<PD7)
****************************/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -