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

📄 bootcfg.h

📁 ATMEGA128自己用的BOOT程序
💻 H
字号:


#ifndef _BOOTCFG_H_
#define _BOOTCFG_H_        1

//定义串口接收缓冲区长度
#define BUFFER__SIZE         128

//系统时钟(Hz)
#ifndef F_CPU
#define F_CPU              7372800UL
#endif

//波特率
#define BAUDRATE           38400

//Boot区起始地址: 按字节计算
//如果定义为0或不定义BootStart,可以节约空间
#define BootStart          0x1e000//0xf000*2

//下载过程中进行数据校验
//ChipCheck和BootStart必须联合使用,校验才有效
#define ChipCheck          1


//等待密码的超时时间 = TimeOutCnt * timeclk
//超时次数
#define TimeOutCnt         5

//同步时间间隔(ms)
#define timeclk            500

//等待文件的超时时间 = TimeOutCntC * timeclk
//发送'C'的最大次数
#define TimeOutCntC        40

//串口号: 0/1/2...
#define COMPORTNo          0

//看门狗使能
#define WDGEn              0

//使用LED指示状态
#define LEDEn              0
//LED控制端口和引脚
#define LEDPORT            B
#define LEDPORTNo          PB3

//某些型号的单片机在初始化后需要延时
#define InitDelay          0

//校验方法  0:CRC16  1:累加和
#define CRCMODE            0

//提示模式: 显示更多交互提示信息,不用可以节省空间
#define VERBOSE            1

#endif

//End of file: bootcfg.h

⌨️ 快捷键说明

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