宏定义时溢出,想用unsigned int,怎么办?
============================================================
有如下一句定义:
#define TIMER_A_50 (750*50) // 50ms
程序中有:
CCR0 = TIMER_A_50; // 50ms
============================================================
IAR C/C++ Compiler for MSP430
V3.20A/W32 [Kickstart] (3.20.1.3)
编译器报警告:
Warning[Pe061]: integer operation result is out of range
Warning[Pe068]: integer conversion resulted in a change of sign
============================================================
而实际上750*50=37500 < 65535,实在是不解,怎么解决此问题呢?