|
1. 例如有代码例子"V6-336_FreeRTOS实验_线程安全的printf方式",
"V6-346-FreeRTOS实验_任务堆栈使用CCM空间",
V6-349-FreeRTOS实验_FreeRTOS+STemWin+FatFS+USB Devicet综合
这个配套书没讲,是不是其它的资料讲了。
emWin在《安富莱_STM32-V7开发板ThreadX GUIX教程(V1.2).pdf 》
FatFS, USB Device没有找到
2. 另外这个函数能否加个参数检查,安全第一。
#include <stdio.h>
extern char *myFormatText1 (const char *, ...);
extern char *myFormatText2 (const char *, ...) __attribute__((format(printf, 1, 2)));
int main(void) {
int a, b;
float c;
a = 5;
b = 6;
c = 9.099999;
myFormatText1("Here are some integers: %d , %d\n", a, b); // No type checking. Types match.
myFormatText1("Here are some integers: %d , %d\n", a, c); // No type checking. Type
mismatch, but no warning.
myFormatText2("Here are some integers: %d , %d\n", a, b); // Type checking. Types match.
myFormatText2("Here are some integers: %d , %d\n", a, c); // Type checking. Warning: 181-D:
argument is incompatible...
}
|
|