Skip to content

Commit

Permalink
fix gpio pin
Browse files Browse the repository at this point in the history
  • Loading branch information
celery6 committed Oct 1, 2024
1 parent feb7109 commit a42a14c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions STM32Cube/Tasks/blinky.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ void blinkyTask(void *argument) {
for (;;) {
// Write 0 to the LED pin (turn it off)
// HAL functions are provided by STM32 to easily interact with hardware
// LEDs are wired to the STM32's GPIO pins - this one specifically is wired to GPIO_B pin 5
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, 0);
// LEDs are wired to the STM32's GPIO pins - this one specifically is wired to GPIO_E pin 10
HAL_GPIO_WritePin(GPIOE, GPIO_PIN_10, 0);

// FreeRTOS function that puts this task on pause for 500 ticks (0.5 sec)
// Other tasks will run while this task is paused
vTaskDelay(500);

// Write 1 to the LED pin (turn it on)
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, 1);
HAL_GPIO_WritePin(GPIOE, GPIO_PIN_10, 1);

// Pause task for 500 ticks (0.5 sec)
vTaskDelay(500);
Expand Down

0 comments on commit a42a14c

Please sign in to comment.