I am working on a MTS board in FreeRTOS. Right now I am focused on the GPS module and it has 2 signals. One for waking it up and another one called PPS which is a signal normally at 1 but that goes to 0 every 100ms. I need to write the code in C for this second part.
I have done it this way but I don't think it's correct. I'm not sure if it's super simple ad I am over complicating it or vice versa. Any help would be appreciated.
while(1)
{
if((vGPIO1->vFIOPIN &= (1<<18))) // pps is 1
{
vTaskDelay(100/portTick_PERIOD_MS); // wait for 100ms
vGPIO1->vFIOCLR &= ~(1<<18); // after 100 ms goes to 0
}
}