📄 mottypes.h
字号:
/*****************************************************************************/
/* FILE NAME: MOTTYPES.h */
/* */
/* PURPOSE: header file for S12 common definitions */
/* */
/* DESCRIPTION: common definitions for Star12 core registers block. */
/* The standard definitions used to describe register datastructures. */
/* The following conventions are used - */
/* */
/* names starting with 's' followed by a capital letter denote structs */
/* names starting with 'u' followed by a capital letter denote unions */
/* names starting with 't' followed by a capital letter denote typedefs */
/* */
/* MCU register definition is done in separate files, describing each */
/* peripheral register block as a datastructure. Register naming follows as */
/* close as possible the names used in the device specification. */
/* Registers containing individual flags are defined as a union of the byte */
/* and as a bitfield structure. */
/* */
/* Compiler issues (portability) - */
/* ANSI C defines bitfields as 'int', obviously a problem when defining 8 bit*/
/* registers, most compilers have options to modify this. */
/* Cosmic compiler doesn't have a switch, but allows bitfields to be defined */
/* as chars. */
/* ANSI C does not define bitfield ordering (LSB first in used), other */
/* compilers may require modification to these files or use of a compiler */
/* switch. */
/* */
/* Got from FREESCALE */
/* Modified by houlei @2004.12.12 */
/*****************************************************************************/
#ifndef MOTTYPES_H
#define MOTTYPES_H
/******************************************************************************
Standard Definitions
These defines allow for easier porting to other compilers. if porting change
these defines to the required values for the chosen compiler.
******************************************************************************/
typedef unsigned char tU08; /*unsigned 8 bit definition */
typedef unsigned int tU16; /*unsigned 16 bit definition*/
typedef unsigned long tU32; /*unsigned 32 bit definition*/
typedef signed char tS08; /*signed 8 bit definition */
typedef int tS16; /*signed 16 bit definition*/
typedef long int tS32; /*signed 32 bit definition*/
#ifndef UINT8
#define UINT8 tU08 /* unsigned 8-bit */
#define UINT16 tU16 /* unsigned 16-bit */
#define UINT32 tU32 /* unsigned 32-bit */
#define INT8 tS08 /* signed 8-bit */
#define INT16 tS16 /* signed 16-bit */
#define INT32 tS32 /* signed 32-bit */
#endif
#define HIGH 1
#define LOW 0
#define TRUE 1
#define FALSE 0
#define true 1
#define false 0
#define BIG 1
#define SMALL 0
#define NIL 0
typedef tU16 (*procref)();
typedef tU08 ETHADDR[6];
typedef tU32 IPADDR;
typedef unsigned long in_HwAddress; /*unsigned 32 bit definition*/
typedef unsigned char eth_HwAddress[6];
#endif /*MOTTYPES_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -