全部文档
OneOS简介 硬件支持 快速开发指南 编译构造工具 API参考文档 高级语言 用户编程手册 应用笔记 FAQ

基础数据类型


宏定义

#define OS_UINT8_MAX                    0xff
#define OS_UINT16_MAX                   0xffff
#define OS_UINT32_MAX                   0xffffffff
#define OS_UINT64_MAX                   0xffffffffffffffffULL
#define OS_TICK_MAX                     OS_UINT32_MAX

数据类型重定义

内核使用自己重定义的基本数据类型,具体如下:

typedef signed char                     os_int8_t;
typedef signed short                    os_int16_t;
typedef signed int                      os_int32_t;
typedef signed long long                os_int64_t;
typedef unsigned char                   os_uint8_t;
typedef unsigned short                  os_uint16_t;
typedef unsigned int                    os_uint32_t;
typedef unsigned long long              os_uint64_t;
typedef signed int                      os_bool_t;

typedef signed long                     os_base_t;
typedef unsigned long                   os_ubase_t;
typedef os_int32_t                      os_err_t;
typedef os_uint32_t                     os_tick_t; 
typedef os_ubase_t                      os_size_t;
typedef os_base_t                       os_off_t;

某些数据类型补充说明如下:

类型 说明
os_base_t CPU位数相关长整型数据类型
os_ubase_t CPU位数相关无符号长整型数据类型
os_err_t 错误码数据类型
os_tick_t 系统时钟节拍数据类型
os_size_t 字节大小数据类型
os_off_t 偏移数据类型

results matching ""

    No results matching ""

    返回顶部