stm32-f4discovery-cc256x: control LED3 (orange) with hal_led_toggle

This commit is contained in:
Matthias Ringwald 2025-01-15 18:37:15 +01:00
parent be7469f189
commit e7055fc405

View File

@ -250,11 +250,8 @@ ssize_t _read(int fd, void * buf, size_t count){
return -1; return -1;
} }
// TODO: control LED instead of printing its state
void hal_led_toggle(void){ void hal_led_toggle(void){
static bool led_state = false; HAL_GPIO_TogglePin( LD3_GPIO_Port, LD3_Pin);
led_state = !led_state;
printf("LED State %u\n", led_state);
} }
// main.c // main.c