新手入门
- 积分
- 26
- 金钱
- 26
- 注册时间
- 2013-3-2
- 在线时间
- 0 小时
|
今天看到一个程序中有下面3个模块,但不知道是什么意思,为什么要写这些语句?
(1)#ifdef USE_STM3210B_EVAL
#include "stm3210b_eval_lcd.h"
#elif defined USE_STM3210E_EVAL
#include "stm3210e_eval_lcd.h"
#elif defined USE_STM3210C_EVAL
#include "stm3210c_eval_lcd.h"
#endif
(2)#ifdef USE_STM3210B_EVAL
#define MESSAGE1 "STM32 Medium Density"
#define MESSAGE2 " Device running on "
#define MESSAGE3 " STM3210B-EVAL "
#elif defined USE_STM3210E_EVAL
#define MESSAGE1 " STM32 High Density "
#define MESSAGE2 " Device running on "
#define MESSAGE3 " STM3210E-EVAL "
#elif defined USE_STM3210C_EVAL
#define MESSAGE1 " STM32 Connectivity "
#define MESSAGE2 " Line Device running"
#define MESSAGE3 " on STM3210C-EVAL "
#endif
(3)#ifdef __GNUC__
#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
#else
#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
#endif
这3个模块的语句都看不懂,请各位帮帮忙!
|
|