|
发表于 2013-11-7 15:03:28
|
显示全部楼层
在CW 10.5下试了一下楼主的问题,没有问题啊。
我用K60的片子做的测试
楼主用的是那个芯片,S08还是kinetis 还是别的片子?
我的代码:
#include "derivative.h" /* include peripheral declarations */
#include <stdio.h>
signed char dest[50];
void ComMe(){
const signed char me[]={"\
Command list:\r\n\
ME or HELP or /?\r\n\
REPORT\r\n\
READ\r\n\
CLEAR\r\n\
HEX\r\n\
RESET ALL\r\n\
SET DATETIME DD/MM/YYYY HH:MM:SS\r\n\
SET BAUDRATE n(600-115200)\r\n\
SET FLASH 1|0(En|Dis) 20(OnTime) 10(OffTime) 90(Period)\r\n\
SET TIMES 100(Transtime) 20(ADtime) \r\n\
SET LUX 1 10 100 1000\r\n\
SET LS 20 500 3000\r\n\
SET SPEED n(Low) n(High) n(Low_R) n(High_R)\r\n\
"};
sprintf(dest, "this test is %s", me[1]);
}
int main(void)
{
。。。
ComMe();
。。。
} |
|