📄 lustart.h
字号:
/*****************************************************
lustart.h - Startup data structure for ST7
----------------------------------------------------
Copyright (c) HIWARE AG, Basel, Switzerland
All rights reserved
Do not modify!
*****************************************************/
#ifndef LUSTART_H
#define LUSTART_H
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned char Byte;
typedef void (*PROC) (void);
#define FAR far
/**** These data structure contain several pointers. All data pointers are
FAR pointers! */
typedef unsigned char *FAR POINTER;
/**** The following is a description of a memory range starting at address
'base' and 'size' bytes long. (I.e. [base .. (base+size)[) */
typedef struct {
POINTER beg;
unsigned int size;
} _Range, *FAR _RangePtr;
/*
Note: The structure above does not exactly describe the actual range
descriptors generate by the linker. To save memory, the linker
simply allocates a POINTER, followed by a WORD, i.e. 5 bytes.
Due to a padding byte added by the compiler to make the struct's
size even, one cannot use this description to access the memory
containing the ranges to clear.
*/
/**** The copy-down descriptor. */
typedef struct {
unsigned int size;
POINTER destination;
/* Byte data[(size & 1) ? size + 1 : size];*/
} _CopyDesc, *FAR _CopyPtr;
/* After the data of a copy-down descriptor, the next one follows, i.e. the
whole copy-down section can be described as
CopyDesc copyDownSection[];
An entry with (size == 0) terminates the array.
*/
typedef POINTER _Init;
typedef struct _tagStartup {
unsigned int flags;
PROC main; /* Main function of user's application */
unsigned int filler1;
unsigned int filler2;
char filler21;
/* POINTER */ unsigned char stackOffset; /* Initial value of the stack pointer */
unsigned int nofZeroOuts; /* #blocks to clear in memory */
_RangePtr pZeroOut; /* Pointer to array of '_Range', terminated
by an entry with size 0 */
unsigned int filler3;
_CopyPtr toCopyDownBeg; /* First copy descriptor */
PROC *FAR mInits; /* Pointer to array of function pointers,
terminated by a 0 entry */
_Init *FAR libInits; /* Pointer to array of pointers to startup
descriptors of ROM libraries, terminated
by NULL */
} _startupDesc;
#pragma DATA_SEG FAR _STARTUP
extern _startupDesc _startupData;
extern void _Startup (void); /* Execution begins in this procedure */
/*--------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -