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

📄 code_upgrade.h

📁 shengji chengxu daoshi hezai xiaznai
💻 H
字号:
/*code_upgrade.h*/
#ifndef CODE_UPGRADE_H
#define CODE_UPGRADE_H


#ifdef __cplusplus
extern "C"
{
#endif

#ifdef MSP430F449
#define USER_CODE_STA 0x1600
#define BOOT_CODE_STA 0x11
#define SEG_CNT 117
#else
#ifdef DTSF
#define USER_CODE_STA 0xC400
#define BOOT_CODE_STA 0xC0
#define SEG_CNT 30
#else
#define USER_CODE_STA 0x8400
#define BOOT_CODE_STA 0x80
#define SEG_CNT 62
#endif
#endif

#ifdef MSP430F449
#define DATA_BUFF_LEN	  59872
#else
#ifdef DTSF
#define DATA_BUFF_LEN     15328
#else
#define DATA_BUFF_LEN     31712
#endif
#endif

#define ECC_BUFF_LEN			3				
#define	NO_DATA_ERROR			0
#define ECC_ERROR				1
#define CORRECTABLE_ERROR		12	
#define NULL     00

extern void flash_write_byte(unsigned char *flash_ptr, unsigned char byte);
extern void erase_all_user_code(void);
extern unsigned char do_upgrade(unsigned char *data);

#define code_sel() (*(unsigned char *)0x1080==0xFF?ERROR:OK)

#ifdef __cplusplus
}
#endif


#endif /* CODE_UPGRADE_H*/

⌨️ 快捷键说明

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