📄 cal_ldr.h
字号:
/***************************************************************************
* This code and information is provided "as is" without warranty of any *
* kind, either expressed or implied, including but not limited to the *
* implied warranties of merchantability and/or fitness for a particular *
* purpose. *
* *
* Copyright (C) 2006 Teridian SemiConductor, Corporation. *
* All Rights Reserved. *
* *
***************************************************************************/
//**************************************************************************
// DESCRIPTION: 71M6521B - Boot Loader Include.
//
// AUTHOR: MTF
//
// HISTORY: See end of file.
//**************************************************************************
// File: CAL_LDR.H
//
// BLDR interface variables.
#ifndef _CAL_LDR
#define _CAL_LDR
// Definitions for Intel HEX Records.
#define RWB 0x01 // Read data records are odd (1 mod 2).
#define WRITE 0x00 // Write data records are even (0 mod 2).
#define READ 0x01
#define DATA_REC 0x00 // Write CE record (alternate).
#define EOF_REC 0x01 // End-of-file record.
#define WRITE_CE_REC 0x02 // Write CE record.
#define READ_CE_REC 0x03 // Read CE record.
#define WRITE_MPU_REC 0x04 // Write MPU record.
#define READ_MPU_REC 0x05 // Read MPU record.
#define WRITE_RTC_REC 0x06 // Write RTC record.
#define READ_RTC_REC 0x07 // Read RTC record.
#define WRITE_SFR_REC 0x08 // Write SFR record.
#define READ_SFR_REC 0x09 // Read SFR record.
#define WRITE_CODE_REC 0x0A // Write code record.
#define READ_CODE_REC 0x0B // Read code record.
#define MAX_REC READ_CODE_REC // Any valid record.
#define WDELIMITER 1 // Width of record delimiter.
#define WCNT 2 // Width of byte count field.
#define WADDR 4 // Width of address field.
#define WTYPE 2 // Width of record type field.
#define WCHK 2 // Width of check digit field.
#define WHEADER (WCNT+WADDR+WTYPE) // Width of HEADER field.
#define WMAXDATA 64 // Maximum width of data field (in nibbles).
#define WMAXRECORD (WHEADER+WMAXDATA+WCHK)
#define HEX_TIMEOUT seconds(2) // HEX record transfer timeout.
#define DEBOUNCE_TIMEOUT milliseconds (100) // Program button debounce timeout.
#endif
void cal_ldr (void);
/***************************************************************************
* History: *
* $Log: cal_ldr.h,v $
* Revision 1.4 2006/10/10 23:05:51 tvander
* Added "read code" feature to read the software's ID. Protocol timeouts no longer write the configuration to EEPROM.
*
* Revision 1.3 2006/08/09 00:56:33 tvander
* *** empty log message ***
*
* Revision 1.2 2006/05/27 01:35:05 tvander
* *** empty log message ***
*
* Revision 1.1 2006/05/25 03:24:12 tvander
* Added timeouts to EEPROMs. Tested all three.
* Newly ported calibration loader, compiles without error.
* RTC setting uses a software timer (less code, also frees tmr1)
*
* Revision 1.6 2006/05/19 01:52:38 gmikef
* *** empty log message ***
*
* Revision 1.5 2006/05/10 01:22:33 gmikef
* *** empty log message ***
*
* Revision 1.1 2006/04/20 01:53:30 Michael T. Fischer
* *** empty log message ***
*
* *
* Copyright (C) 2006 Teridian Semiconductor Corp. All Rights Reserved. *
* this program is fully protected by the United States copyright *
* laws and is the property of Teridian Semiconductor Corporation. *
***************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -