Skip to content

Commit

Permalink
#54 Alternate and Yield
Browse files Browse the repository at this point in the history
  • Loading branch information
Peyton-McKee committed Oct 23, 2023
1 parent f2f6d8a commit 7395be9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Core/Src/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,14 @@ void vWatchdogMonitor(void *pv_params)
for(;;) {
/* Pets Watchdog */
HAL_GPIO_WritePin(gpio, GPIO_PIN_15, GPIO_PIN_SET);

/* Delay for 5ms */
osDelay(5);

/* Set Low Again */
HAL_GPIO_WritePin(gpio, GPIO_PIN_15, GPIO_PIN_RESET);

/* Yield to other RTOS tasks */
osThreadYield();
}
}

0 comments on commit 7395be9

Please sign in to comment.