单片机中通用的类型别名
生活随笔
收集整理的這篇文章主要介紹了
单片机中通用的类型别名
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
單片機中通用的類型別名
#ifndef _TYPE_H_ #define _TYPE_H_#ifdef __GNUC__ #define __packed __attribute__((aligned(1))) #endif/* exact-width signed integer types */ typedef signed char int8_t; typedef signed short int int16_t; typedef signed int int32_t;/* exact-width unsigned integer types */ typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; typedef unsigned int size_t;#ifndef NULL #ifdef __cplusplus // EC++ #define NULL 0 #else #define NULL ((void *) 0) #endif #endif#ifndef boolean typedef uint8_t boolean; #endif#ifndef MAX #define MAX(x, y) ( ((x) > (y)) ? (x) : (y) ) #endif#ifndef MIN #define MIN(x, y) ( ((x) < (y)) ? (x) : (y) ) #endif#endif /* _TYPE_H_ */總結
以上是生活随笔為你收集整理的单片机中通用的类型别名的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 孪生网络pytoch实现,以resnet
- 下一篇: svn回退到指定版本