From 1d0497306df231a7af4f20e3e9370c087d2793ea Mon Sep 17 00:00:00 2001 From: liumin Date: Tue, 26 Aug 2025 10:38:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20boot.H?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- boot.H | 79 ---------------------------------------------------------- 1 file changed, 79 deletions(-) delete mode 100644 boot.H diff --git a/boot.H b/boot.H deleted file mode 100644 index b11c0cf..0000000 --- a/boot.H +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef _BOOT_H_ -#define _BOOT_H_ -#include "XC88x_FLADDR.H" - -#define ArrXram ((ubyte volatile xdata *)0xf000) -#define DF_XramLenth 0x600 -#define ArrBootCode ((ubyte volatile code *)0x7000) -#define DF_BootCodeLenth 0x600 - - - -#define ACKNOWLEDGE 0x55 -#define BLOCK_ERROR 0xFF -#define TIMEOUT_ERROR 0xF0 -#define PROTECTION_ERROR 0xFD - -#define RX_MSGOBJ 5 -#define TX_MSGOBJ 9 // Define the Message Object for Transmit (No FIFO// is supported for Transmit) - - -//---外部要使用变量声明--------------------------------------------------------------------- -void BootMain(void); -void CAN_waitTransmit(ubyte RgMsgobj); - - - -//+------------------------------------------------+ -//| Global variables needed -//+------------------------------------------------+ -// Buffer for the 32byte data before being written to eEPROM -extern unsigned char idata WLBuf[BYTES_PER_WORDLINE]; - -// Function to program the WLBuf to Flash Memory -bit ProgWL(unsigned char code *AdrBnkXSecYWLZ); -// Function to load the data from XDATA memory to WLBuf -void LoadXD2WLBuf(unsigned char xdata *address); -// Function to load the data from CODE memory to WLBuf -// This is used to copy data from one Flash location to another. -void LoadConst2WLBuf(unsigned char code *address); -// Function to load the data from CODE memory to XDATA memory -void LoadConst2XD(unsigned char xdata *dstaddress, unsigned char code *srcaddress, unsigned char length); -// Function to read a byte from CODE memory -unsigned char ReadConst(unsigned char code *address); - -// All of the description of the functions below is done in XC88x_FLHANDER.ASM -// Erase Flash Sectors -// Required Stack Size = 12 -extern bit PFlErase (unsigned char Bank0Sector, unsigned char Bank1Sector, unsigned char Bank2Sector); -extern bit DFlErase (unsigned int DFlash0Sector, unsigned int DFlash1Sector); - -// Program Flash -// Required Stack Size = 12 -extern bit FlProg(unsigned char idata *SrcBuf); - -// Check if Flash is ready to read -// Bank = Bank Number to be checked -// Required Stack Size = 6 -extern bit FlReady(unsigned char Bank); - -// Abort the existing erase process -// Required Stack Size = 6 -extern bit FlEraseAbort(void); - -// Program / Remove Password. -// Detail is available in FLHANDLER.asm -extern bit FlProtect(unsigned char Password); - -extern unsigned char _FlReadByte(void); -extern void FlExecute(unsigned char AddrH, unsigned char AddrL); - -sfr MEM_DPH = 0x83; -sfr MEM_DPL = 0x82; -sfr MEM_NMICON = 0xBB; -sfr MEM_NMISR = 0xBC; - - - - -#endif \ No newline at end of file