大家好、
客户希望在.cfg 文件中将变量用作 Hwi 的参数。
如何定义将 XGCONF 配置编辑器的.cfg 文件中的变量传递给 Hwi 以使用传递给 ISR 函数的参数?
谢谢、此致、
Kuerbis
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
大家好、
客户希望在.cfg 文件中将变量用作 Hwi 的参数。
如何定义将 XGCONF 配置编辑器的.cfg 文件中的变量传递给 Hwi 以使用传递给 ISR 函数的参数?
谢谢、此致、
Kuerbis
您好、Kuerbis、
下面是将参数传递给"timerFunc"的代码片段示例。 在你的情况下、你应该能够将参数传递给你的 Hwi 函数、如中所示
void I2CUSCIB_hwiIntFxn (UARg 参数)。
Timer_Params timerParams; Timer_Params_init (&timerParams); timerParams.period = 100000;// 100、000 uSecs = 100ms */ timerParams.arg = 5; Timer_con构(&timer0Struct, Timer_Any,(Timer_Functr) timerc、&TimerParams null); 这是将 arg 作为参数的计时器函数。 这使您可以对多个计时器使用相同的计时器功能。 void timerFunc (UArg arg) { ... }