在OS_CPU.H文件中,定义了UCOS系统使用的数据类型,在ARM中移植时 typedef unsigned char BOOLEAN; typedef unsigned char INT8U; typedef signed char INT8S; typedef unsigned short INT16U; typedef signed short INT16S; typedef unsigned int INT32U; typedef signed int INT32S; typedef float FP32; typedef double FP64; 在ARM中unsigned int 是32位,而在51中,unsigned int 是16位。在51中移植如下: typedef unsigned char BOOLEAN; typedef unsigned char INT8U; typedef signed char INT8S; typedef unsigned int INT16U; typedef signed int INT16S; typedef unsigned long INT32U; typedef signed long INT32S; typedef float FP32; typedef double FP64; 其中BOOLEAN、INT8U、INT8S、INT16U、INT16S、INT32U、INT32S、FP32、FP64是UCOS源文件使用的数据类型。unsigned in等是ADS编译器或51编译器使用的数据类型。
文章评论(0条评论)
登录后参与讨论