概述
#ifndef _TYPEFEF_H
#define _TYPEFEF_H
#include <config.h>
#include <inttypes.h>
typedef char S8; /* signed 8-bit integer /
typedef short S16; / signed 16-bit integer /
typedef long S32; / signed 32-bit integer /
typedef unsigned char U8; / unsigned 8-bit integer /
typedef unsigned short U16; / unsigned 16-bit integer /
typedef unsigned long U32; / unsigned 32-bit integer */
typedef char s8; /* signed 8-bit integer /
typedef short s16; / signed 16-bit integer /
typedef long s32; / signed 32-bit integer /
typedef uint8_t u8; / unsigned 8-bit integer /
typedef uint16_t u16; / unsigned 16-bit integer /
typedef uint32_t u32; / unsigned 32-bit integer /
typedef uint64_t u64; / unsigned 32-bit integer */
typedef volatile U32 * RP;
typedef volatile U16 * RP16;
typedef volatile U8 * RP8;
#define __STATIC_INLINE static inline
#define write_reg(reg, data)
*(RP)(reg) = data
#define read_reg(reg)
*(RP)(reg)
#define write_byte(reg, data)
*(RP8)(reg) = data
#define read_byte(reg)
*(RP8)(reg)
#define write_halfword(reg, data)
*(RP16)(reg) = data
#define read_halfword(reg)
*(RP16)(reg)
#ifdef __cplusplus
#define __I volatile /*!< Defines ‘read only’ permissions /
#else
#define __I volatile const /!< Defines ‘read only’ permissions /
#endif
#define __O volatile /!< Defines ‘write only’ permissions /
#define __IO volatile /!< Defines ‘read / write’ permissions */
/* following defines should be used for structure members /
#define __IM volatile const /! Defines ‘read only’ structure member permissions /
#define __OM volatile /! Defines ‘write only’ structure member permissions /
#define __IOM volatile /! Defines ‘read / write’ structure member permissions */
#endif /TYPEFEF_H_/
最后
以上就是靓丽煎饼为你收集整理的type.h的全部内容,希望文章能够帮你解决type.h所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复