
C 语言技巧
Life_Maze
墨攻
展开
-
printf 调试宏
#define DRV_DEBUG #ifdef DRV_DEBUG #define DRV_PRINT(fmt, ...) printf(fmt, __VA_ARGS__) #else #define DRV_PRINT(fmt, ...) #endif-------------------------------------------------------------------#def...原创 2018-03-23 01:25:11 · 362 阅读 · 0 评论 -
宏函数条件编译 映射
void HwUARTInit(void); // 串口任务初始化void HwUARTWrite(uint8_t *buf, uint16_t len); //打印字符串void HwUARTPrintf(const char* format, ...); //printf打印#ifdef USER_UART#define UesrUARTInit() H...原创 2018-03-21 15:36:02 · 383 阅读 · 0 评论 -
c语言 指针注意点
int ** Ptr <==> int Ptr[ x ][ y ]; int *Ptr[ 5 ] <==> int Ptr[ 5 ][ x ]; int ( *Ptr )[ 5 ] <==> int Ptr[ x ][ 5 ]; 这里 x 和 y 是表示若干的意思。...原创 2018-11-23 15:34:33 · 379 阅读 · 0 评论