|
发表于 2009-9-9 21:17:58
|
显示全部楼层
122
logMsg可以在中断中使用,好像调用这个函数只是将相关的msg输出到缓冲区,它还有一个守候任务最终负责输出的,这样就可以在中断中使用了.(printf不能在中断中使用!)
the logMsg( ) routine takes a char * rather than a const char * and requires a fixed number of arguments (6).
logMsg()例程中的参数是char*而不是const char*,并且需要固定数目的参数(logMsg最多可接受6个参数,printf可以接受可变数目的参数)
logMsg( ) checks to see whether or not it is running in interupt context. If it is, it will not block. However, if invoked from a task, it can cause the task to block.
logMsg()检查其是否在中断上下文中运行.如果是,它不会进行阻塞;但是,如果其由任务调用,它将阻塞相应的任务(直到msg输出完成) |
|