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

📄 board.h

📁 用ATMAGE16写的对AVR进行仿真和下载的程序
💻 H
字号:
#ifndef __BOARD_H__
#define __BOARD_H__


#include "iom16v.h"

#define TRUE  (1 == 1) 
#define FALSE (1 == 0) 

#define SYSCLK 7372800L		//CLK = 7.3728MHz

#define SPMCSR SPMCR

#define MASK(BIT) (1 << BIT)
#define SETB(PORT, BIT) (PORT |= (1 << BIT))
#define CLRB(PORT, BIT) (PORT &= ~(1 << BIT))
#define TSTB(PORT, BIT) ((PORT & (1 << BIT)) != 0)

#define bool   unsigned char
#define uint08 unsigned char
#define uint16 unsigned short
#define uint32 unsigned long

#define sint08 signed char
#define sint16 signed short
#define sint32 signed long

#define RST  PB1			//RESET pin of the target (output)
#define SSn  PB4			//SS    pin of the Master (output)
#define MOSI PB5			//MOSI  pin of the target (output)
#define MISO PB6			//MISO  pin of the target (input)
#define SCK  PB7			//SCK   pin of the target (output)

#define LED0 PA5
#define LED1 PA6
#define LED2 PA7

#define LEDBUSY PA7
#define LEDRDY  PA6
#define LEDFAIL PA5

#define BLOCKSIZE 256


#endif

⌨️ 快捷键说明

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