[vscode][nrf51][nrf52] uint8_t uint16_t uint32_t 等等变量异常

时间:2022-10-31 19:59:08


打开 .vscode\c_cpp_properties.json
添加内容

“__CC_ARM”,
“__STATIC_INLINE=static”

成品:

{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE",
"__CC_ARM",
"__STATIC_INLINE=static"
]
}
],
"version": 4
}

第二种情况:
添加头文件
#include <stdint.h>