⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tools.h

📁 AVR USB 下载线, 全套的开发资料,想做板子的可以参考下/
💻 H
字号:
#ifndef __TOOLS_H
#define __TOOLS_H

#define		TRUE		1
#define		FALSE		0

#define		CHIP_CLOCK	8000000

//F黵s Bit setzen und l鰏chen
#define		BIT0_POS	(1<<0)
#define		BIT1_POS	(1<<1)
#define		BIT2_POS	(1<<2)
#define		BIT3_POS	(1<<3)
#define		BIT4_POS	(1<<4)
#define		BIT5_POS	(1<<5)
#define		BIT6_POS	(1<<6)
#define		BIT7_POS	(1<<7)

#define		BIT0_NEG	((unsigned char)(~(1<<0)))
#define		BIT1_NEG	((unsigned char)(~(1<<1)))
#define		BIT2_NEG	((unsigned char)(~(1<<2)))
#define		BIT3_NEG	((unsigned char)(~(1<<3)))
#define		BIT4_NEG	((unsigned char)(~(1<<4)))
#define		BIT5_NEG	((unsigned char)(~(1<<5)))
#define		BIT6_NEG	((unsigned char)(~(1<<6)))
#define		BIT7_NEG	((unsigned char)(~(1<<7)))

//Hardware-Interface
//LED an PORTC 0
#define		LED_GN_OFF		PORTB&=BIT0_NEG
#define		LED_GN_ON		PORTB|=BIT0_POS
#define		LED_GN_TOG		PORTB^=BIT0_POS
//LED an PORTC 1
#define		LED_RT_OFF		PORTB&=BIT1_NEG
#define		LED_RT_ON		PORTB|=BIT1_POS
#define		LED_RT_TOG		PORTB^=BIT1_POS

#endif

⌨️ 快捷键说明

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