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

📄 define.h

📁 ATEMEL AVR128 BOOT程序
💻 H
字号:

#define 	R0	(*(volatile unsigned char *)0x00)

/*位变量的宏操作*/
#define		BIT_SET(a,b)	a|=BIT(b)
#define		BIT_CLR(a,b)	a&=~BIT(b)
#define		BIT_REV(a,b)	a^=BIT(b)
#define		BIT_TEST(a,b)	a&BIT(b)						 

/*NOPS定义*/
#define		NOP_2		NOP();NOP()
#define		NOP_3		NOP();NOP();NOP()
#define		NOP_4		NOP();NOP()NOP();NOP()
#define		NOP_5		NOP();NOP()NOP();NOP();NOP()

#define	 SPM_PAGESIZE	128
#define	 READ_BLOCK_SIZE	256

/********************************************************************************

				接 受 状 态 机
信息格式
MESSAGE_START
SEQUENCE_NUMBER 
MESSAGE_SIZE 
TOKEN 
MESSAGE_BODY 
CHECKSUM
/********************************************************************************/
#define		ST_START		0xF0	//0xF000
#define		ST_GET_SEQ_NUM		0xF1	//0xF001
#define 	ST_MSG_SIZE_1		0xF2	//0xF002
#define 	ST_MSG_SIZE_2		0xF3	//0xF003
#define 	ST_GET_TOKEN		0xF4	//0xF004
#define 	ST_GET_DATA		0xF5	//0xF005
#define		ST_GET_CHECK		0xF6	//0xF006

/*STK500 硬 件 固 件 配 置*/
#define CONFIG_PARAM_BUILD_NUMBER_LOW		12
#define CONFIG_PARAM_BUILD_NUMBER_HIGH		23
#define CONFIG_PARAM_HW_VER					0x12
#define CONFIG_PARAM_SW_MAJOR				2
#define CONFIG_PARAM_SW_MINOR				10

#define SPI_SPEED_4MHZ						0
#define SPI_SPEED_2MHZ						1
#define SPI_SPEED_1MHZ						2
#define SPI_SPEED_500KHZ					3
#define SPI_SPEED_250KHZ					4
#define SPI_SPEED_125KHZ					5
#define SPI_SPEED_62KHZ						6

#define TOP_CARD_STK501						0xAA
#define TOP_CARD_STK502						0x55		
#define TOP_CARD_STK503						0xFA
#define TOP_CARD_STK504						0xEE
#define TOP_CARD_STK505						0xE4
#define TOP_CARD_STK520						0xDD

⌨️ 快捷键说明

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