Part Number: CC1350
Tool/software: Code Composer Studio
I'm trying to use the example function for the timer driver, but I didn't understand a few things:
void taskFxn(UArg a0, UArg a1) {
GPTimerCC26XX_Params params;
GPTimerCC26XX_Params_init(¶ms);
params.width = GPT_CONFIG_16BIT;
params.mode = GPT_MODE_PERIODIC_UP;
params.debugStallMode = GPTimerCC26XX_DEBUG_STALL_OFF;
hTimer = GPTimerCC26XX_open(CC2650_GPTIMER0A, ¶ms);
if(hTimer == NULL) {
Log_error0("Failed to open GPTimer");
Task_exit();
}
Types_FreqHz freq;
BIOS_getCpuFreq(&freq);
GPTimerCC26XX_Value loadVal = freq.lo / 1000 - 1; //47999
GPTimerCC26XX_setLoadValue(hTimer, loadVal);
GPTimerCC26XX_registerInterrupt(hTimer, timerCallback, GPT_INT_TIMEOUT);
GPTimerCC26XX_start(hTimer);
while(1) {
Task_sleep(BIOS_WAIT_FOREVER);
}
}
What do reference arguments a0 and a1 account for?
And how do I create tasks that will use this function?
Thank you