Tool/software: TI-RTOS
Hello,
The example provided by Siri in this thread is really helpful, but for me some questions remain:
1. Does this program only run once when starting, because there is no loop or anything?
2. In order to run this program in a loop, do I have to put Timer_start() in a loop like this?
while(1) { GPTimerCC26XX_start(hTimer0A); GPTimerCC26XX_start(hTimer0B); if (timeDiff != 0){ GPIO_write(Board_GPIO_LED1, Board_GPIO_LED_ON); // Grün break; } }
3. Do these code lines serve the purpose to assign the Interrupt to the Pins 1 / 21 ?
.
.
/* Open LED pins */
ledPinHandle = PIN_open(&ledPinState, pinTable);
if
(ledPinHandle == NULL)
{
while
(1);
}
GPTimerCC26XX_PinMux pinMux = GPTimerCC26XX_getPinMux(hTimer0A); PINCC26XX_setMux(ledPinHandle, CC1310_LAUNCHXL_DIO21, pinMux); pinMux = GPTimerCC26XX_getPinMux(hTimer0B); PINCC26XX_setMux(ledPinHandle, CC1310_LAUNCHXL_DIO1, pinMux);
But what is the reason for the LED's here?
If there is any further documentation please let me know!
Kind regards