在外部语句 "extern SensLocationStruct code SensLocation[];" 中寻找变量或关键字 "code" 的解释
Looking for explanation on variable or keyword "code" in extern statement "extern SensLocationStruct code SensLocation[];"
我目前正在弄清楚别人代码的功能和结构,如果您对此有任何建议,我将不胜感激。
无论如何,我遇到了一些外部行中包含的词。这是我遇到的几行代码。
extern unchar code Sdrr[];
extern SensLocationStruct code SensLocation[];
extern SensorConfigStruct code SensorConfig[];
extern unchar code DefaultFruData[];
extern FruLocationStruct code FruDevice[];
现在,我说的是"code"。
仔细查看代码后,我没有看到 "code" 这个词的特殊声明或定义。它似乎甚至都没有在以后的函数中被调用。它只出现在这些 extern 语句中。
结构是:
typedef struct
{
unsigned char device;
unsigned char addr;
unsigned char bus;
} SensLocationStruct;
typedef struct
{
unsigned char SensNum;
unsigned char device;
unsigned char IOType;
unsigned char regIO;
unsigned char calib;
} SensorConfigStruct;
typedef struct
{
unsigned char device;
unsigned char addr;
unsigned char bus;
unsigned char frusize;
} FruLocationStruct;
有人知道这是什么或做什么吗?任何事情都会有所帮助。
这个通常用来定义变量所在的内存space。 Intel 使用 von Neumann architecture. There is only one address space, an address like 0x100 clearly identifies the target. On the other hand the Harvard architecture 两次使用此地址:在程序 代码 内存和数据内存 space 中。 8051 系列有三种存储器 space:ProgramCode、InternalRAM 和 externalRAM。他们每个人都需要不同的指令来访问汇编程序级别。
我目前正在弄清楚别人代码的功能和结构,如果您对此有任何建议,我将不胜感激。
无论如何,我遇到了一些外部行中包含的词。这是我遇到的几行代码。
extern unchar code Sdrr[];
extern SensLocationStruct code SensLocation[];
extern SensorConfigStruct code SensorConfig[];
extern unchar code DefaultFruData[];
extern FruLocationStruct code FruDevice[];
现在,我说的是"code"。
仔细查看代码后,我没有看到 "code" 这个词的特殊声明或定义。它似乎甚至都没有在以后的函数中被调用。它只出现在这些 extern 语句中。
结构是:
typedef struct
{
unsigned char device;
unsigned char addr;
unsigned char bus;
} SensLocationStruct;
typedef struct
{
unsigned char SensNum;
unsigned char device;
unsigned char IOType;
unsigned char regIO;
unsigned char calib;
} SensorConfigStruct;
typedef struct
{
unsigned char device;
unsigned char addr;
unsigned char bus;
unsigned char frusize;
} FruLocationStruct;
有人知道这是什么或做什么吗?任何事情都会有所帮助。
这个通常用来定义变量所在的内存space。 Intel 使用 von Neumann architecture. There is only one address space, an address like 0x100 clearly identifies the target. On the other hand the Harvard architecture 两次使用此地址:在程序 代码 内存和数据内存 space 中。 8051 系列有三种存储器 space:ProgramCode、InternalRAM 和 externalRAM。他们每个人都需要不同的指令来访问汇编程序级别。