📄 isd51_u2.h
字号:
//
// ISD51 In-System Debugger for 8051 based microcontrollers
// Copyright KEIL ELEKTRONIK GmbH and Keil Software, Inc. 2000 - 2002
// Version 1.00 Beta 0
//------------------------------------------------------------------------------
// ISD51.H: This header file allows the configuration of the ISD51
// In-System Monitor.
//
// Note: This file modified for uart2 on uPSD system. Designed to
// to link with ISD51_U2.obj
//
//
// Copy this file to your project folder and add the copy to your uVision2
// project. You can customize several parameters of the ISD51 In-System
// Monitor within this configuration file.
//
//------------------------------------------------------------------------------
// ISD51 Memory Space
// ==================
//
// The following define specifies the size of the on-chip DATA/IDATA RAM.
// Most 8051 devices have 256 bytes IDATA RAM. Some devices offer just
// 128 Bytes. ISD51 uses 1 Byte in this IDATA. In addition each software
// breakpoint requires another 2 Bytes IDATA space. For example, if two
// breakpoints are defined, ISD51 uses the IDATA locations 0xFB .. 0xFF.
#define RAMSIZE 0x100 // default is 0x100 => 256 bytes IDATA RAM
//------------------------------------------------------------------------------
//
// ISD51 UART Interface
// ====================
//
// ISD51.a51 has been modified for uPSD UART2 it now becomes ISD51_U2.a51
//
//------------------------------------------------------------------------------
//
// ISD51 Functions
// ===============
//
// The following C Macro define the IDS51 functions
#ifdef __C51__
#include <absacc.h>
extern void __isd_init (void); // ISD51 core init function
#define ISDinit() \
if ((IEA & 0x10) == 0) { /* Is ISD51 UART already initialized? */ \
__isd_init (); /* Init ISD51 core & enable ISD interrupt */ \
}
#define ISDwait() \
while (1) { \
if (SCON2 & 0x01) { /* wait until Debugger sends 0xA5 */ \
if (SBUF2 == 0xA5) break; \
SCON2 &= 0xFE; \
} \
} \
__isd_init (); /* Init ISD51 core & enable ISD interrupt */
#define ISDcheck() \
if ((IEA & 0x10) == 0) { /* Is ISD51 UART already initialized? */ \
if (SCON2 & 0x01) { /* wait until Debugger sends 0xA5 */ \
if (SBUF2 != 0xA5) SCON2 &= 0xFE; \
else __isd_init (); /* Init core & ISD interrupt */ \
} \
} \
#define ISDdisable() /* Disable ISD Interrupt */ \
IEA &= 0xEF;
#define ISDenable() /* Enable ISD Interrupt */ \
IEA |= 0x10;
#define ISDbreak() /* hard-code program stop (breakpoint) */ \
SCON2 |= 0x02; /* Set TI - Enter ISD Interrupt function */ \
_nop_ ();
#endif
//-----------------------------------------------------------------------------
//---------------- !!! End of User Configuration Part !!! ------------------
//-----------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -