boards/thingy53: fix possible out of bound write for rgb

properly initialize PWM info struct to avoid out of bound write

Signed-off-by: raiden00pl <raiden00@railab.me>
This commit is contained in:
raiden00pl 2026-05-13 09:19:32 +02:00 • committed by Alin Jerpelea
parent be46d87e1a
commit 311214f90c

View file

@ -84,13 +84,18 @@ int nrf53_rgbled_initialize(void)
/* Define frequency and duty cycle */
memset(&info, 0, sizeof(info));
ledg = ledr;
ledb = ledr;
info.frequency = 100;
info.channels[0].duty = 0;
info.channels[0].channel = 1;
info.channels[1].duty = 0;
info.channels[1].channel = 2;
info.channels[2].duty = 0;
info.channels[2].channel = 3;
/* Initialize LED R */