Skip to content

Instantly share code, notes, and snippets.

@kkmonster
Created May 16, 2015 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkmonster/5d2e896a0bd06f83da16 to your computer and use it in GitHub Desktop.
Save kkmonster/5d2e896a0bd06f83da16 to your computer and use it in GitHub Desktop.
void PID_thread(void const * arg)
{
while (true)
{
osEvent evt = osSignalWait(SIGNAL_OUTPUT_1_TOGGLE, osWaitForever);
if (evt.status == osEventSignal)
{
nrf_gpio_pin_set(GPIO_OUTPUT_0);
osDelay(1);
nrf_gpio_pin_clear(GPIO_OUTPUT_0);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment