📄 jnand_comdef.h
字号:
#ifndef __JNAND_COMDEF_H
#define __JNAND_COMDEF_H
/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
Flash Programming Plug-In for Lauterbach JTAG/ICD TRACE32
GENERAL DESCRIPTION
This program is essentially a plug-in for Lauterbach JTAG ICD TRACE32
Debugger FLASH command. The programming can be achieved in two different
modes: emulator controlled or target controlled. The emulator controlled
programming needs no program running on the target, but is slow
(typically about 1 to 5 KBytes/sec). The target controlled programming
requires a user designed FLASH programming routine (and hence this plug-in)
to be available on the target. This plug-in is called by TRACE32 with
appropriate parameters to program FLASH devices. The advantage of this
method is the higher programming speed and more flexibility in the
implementation of the programming algorithm.
To use the plug-in, see the PRACTICE file JNAND.CMM. It not only uses
the built-in FLASH.* commands, but also pokes the parameter buffer with
extended command codes that we need in order to do initialization and
finalization.
In order for the Debugger to get control back after the plug-in completes,
a breakpoint is assumed to be in place after the last instruction
executed in the plug-in.
EXTERNALIZED FUNCTIONS
INITIALIZATION AND SEQUENCING REQUIREMENTS
Must place a breakpoint right after the last instruction in the plug-in
in order for the Debugger to get back control.
Copyright (c) 2002 by QUALCOMM Incorporated. All Rights Reserved.
*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/
/*===========================================================================
EDIT HISTORY FOR MODULE
This section contains comments describing changes made to the module.
Notice that changes are listed in reverse chronological order.
$Header: //depot/asic/MSMSHARED/tools/jnand/jnand_comdef.h#1 $ $DateTime: 2003/02/06 15:47:46 $ $Author: pingguan $
when who what, where, why
-------- --- ----------------------------------------------------------
02/06/03 pg Moved from ASWP402 server to ASWP401 server.
07/05/02 drh Created.
===========================================================================*/
/* ------------------------------------------------------------------------
** Constants
** ------------------------------------------------------------------------ */
#define TRUE 1 /* Boolean true value. */
#define FALSE 0 /* Boolean false value. */
#define ON 1 /* On value. */
#define OFF 0 /* Off value. */
#ifdef _lint
#define NULL 0
#endif
#ifndef NULL
#define NULL 0
#endif
/* -----------------------------------------------------------------------
** Standard Types
** ----------------------------------------------------------------------- */
/* The following definitions are the same accross platforms. This first
** group are the sanctioned types.
*/
typedef unsigned char boolean; /* Boolean value type. */
typedef unsigned long int uint32; /* Unsigned 32 bit value */
typedef unsigned short uint16; /* Unsigned 16 bit value */
typedef unsigned char uint8; /* Unsigned 8 bit value */
typedef signed long int int32; /* Signed 32 bit value */
typedef signed short int16; /* Signed 16 bit value */
typedef signed char int8; /* Signed 8 bit value */
/* This group are the deprecated types. Their use should be
** discontinued and new code should use the types above
*/
typedef unsigned char byte; /* Unsigned 8 bit value type. */
typedef unsigned short word; /* Unsinged 16 bit value type. */
typedef unsigned long dword; /* Unsigned 32 bit value type. */
typedef unsigned char uint1; /* Unsigned 8 bit value type. */
typedef unsigned short uint2; /* Unsigned 16 bit value type. */
typedef unsigned long uint4; /* Unsigned 32 bit value type. */
typedef signed char int1; /* Signed 8 bit value type. */
typedef signed short int2; /* Signed 16 bit value type. */
typedef long int int4; /* Signed 32 bit value type. */
typedef signed long sint31; /* Signed 32 bit value */
typedef signed short sint15; /* Signed 16 bit value */
typedef signed char sint7; /* Signed 8 bit value */
/* ARM based targets use memory mapped i/o, so the inp/outp calls are
** macroized to access memory directly
*/
#define inp(port) (*((volatile byte *) (port)))
#define inpw(port) (*((volatile word *) (port)))
#define outp(port, val) (*((volatile byte *) (port)) = ((byte) (val)))
#define outpw(port, val) (*((volatile word *) (port)) = ((word) (val)))
#ifndef MIN
#define MIN( x, y ) ( ((x) < (y)) ? (x) : (y) )
#endif
#endif /* __JNAND_COMDEF_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -