TI中文支持网
TI专业的中文技术问题搜集分享网站

ti的 2650 SDK的bios系统,临界代码段保护怎么操作,用哪个api

ti的  2650 SDK的bios系统,临界代码段保护怎么操作,用哪个api

Viki Shi:

BIOS的操作请参考sdk中的SYS/BIOS (TI-RTOS Kernel) User's Guid

user1388075:

回复 Viki Shi:

没有介绍

user1388075:

回复 Viki Shi:

UInt gateKey;
GateHwi_Handle gateHwi;
GateHwi_Params prms;
Error_Block eb;
Error_init(&eb);
GateHwi_Params_init(&prms);
gateHwi = GateHwi_create(&prms, &eb);
if (gateHwi == NULL) {
System_abort("Gate create failed");
}
/* Simultaneous operations on a global variable by multiple
* threads could cause problems, so modifications to the global
* variable are protected with a Gate. */
gateKey = GateHwi_enter(gateHwi);
myGlobalVar = 7;
GateHwi_leave(gateHwi, gateKey);

user1388075:

回复 user1388075:

"C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/running_sensor/cc26xx/app/running_sensor.c", line 428: error #20: identifier "GateHwi_Handle" is undefined
"C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/running_sensor/cc26xx/app/running_sensor.c", line 429: error #20: identifier "GateHwi_Params" is undefined
"C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/running_sensor/cc26xx/app/running_sensor.c", line 430: error #20: identifier "Error_Block" is undefined
"C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/running_sensor/cc26xx/app/running_sensor.c", line 431: warning #225-D: function "Error_init" declared implicitly

Viki Shi:

回复 user1388075:

未定义报错,全局变量需要在使用的地方声明成extern

赞(0)
未经允许不得转载:TI中文支持网 » ti的 2650 SDK的bios系统,临界代码段保护怎么操作,用哪个api
分享到: 更多 (0)