|
|
#ifndef __UPDATA_H
|
|
|
#define __UPDATA_H
|
|
|
|
|
|
#include "ff.h"
|
|
|
#include "SPI_SD.h"
|
|
|
#include "diskio.h"
|
|
|
#include "Flash.h"
|
|
|
|
|
|
#include "sys.h"
|
|
|
#define L_OFFSET 40
|
|
|
#define LINE0 10
|
|
|
#define LINE1 50
|
|
|
#define LINE2 LINE1+L_OFFSET
|
|
|
#define LINE3 LINE2+L_OFFSET
|
|
|
#define LINE4 LINE3+L_OFFSET
|
|
|
#define LINE5 LINE4+L_OFFSET
|
|
|
#define LINE6 LINE5+L_OFFSET
|
|
|
#define LINE7 LINE6+L_OFFSET
|
|
|
#define LINE8 LINE7+L_OFFSET
|
|
|
|
|
|
#define run_time 20
|
|
|
extern u32 Flash_ID;
|
|
|
signed char Flash_Updata(const char *buf,char CS);
|
|
|
void num_to_char(char *buf,u8 num);
|
|
|
|
|
|
extern u8 uart_nand_BBM_flag;
|
|
|
signed char W25N01GV_BBM(unsigned short Block_num);
|
|
|
|
|
|
#define APP_ADDR 0x8010000 //0x08016000 0x800F800 //ÔÚ£¨1024¡Á32£©32K¿ªÊ¼ÔËÐÐ 0x800A000 0x08016000 0x8011500
|
|
|
#define APP2_ADDR 0x8049000
|
|
|
signed char APP_Updata(const char *buf);
|
|
|
|
|
|
#endif
|