From 93ac20ee1a6f594d5c892046ef374b839da3b683 Mon Sep 17 00:00:00 2001 From: hasslesstech Date: Thu, 19 Nov 2026 12:23:54 +0200 Subject: [PATCH] detach LEDs from DIP switches --- KPI_Rover/LEDMode/ulLEDMode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/KPI_Rover/LEDMode/ulLEDMode.c b/KPI_Rover/LEDMode/ulLEDMode.c index c7274fb..4439640 100644 --- a/KPI_Rover/LEDMode/ulLEDMode.c +++ b/KPI_Rover/LEDMode/ulLEDMode.c @@ -8,12 +8,16 @@ static void ulLEDMode_Task(void *arg) { (void) arg; + register int current_light = 0; + for ( ; ; ) { - GPIOB->ODR |= 0xF000; - GPIOB->ODR &= ~(~GPIOE->IDR & 0xF000); + current_light++; + current_light &= 0x3; - osDelay(10); + GPIOB->ODR = 0xF000 & ~(0x1000 << current_light); + + osDelay(200); } }