From bea1115ff1b37864a6a3940a0f4b7334c80cb225 Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Fri, 2 Mar 2018 11:37:19 +0100 Subject: [PATCH] Uses const UINT8_MAX for max value of uint8_t type; Fixes loop condition. --- bsp/stm32f429-armfly/drivers/drv_ft5x06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/stm32f429-armfly/drivers/drv_ft5x06.c b/bsp/stm32f429-armfly/drivers/drv_ft5x06.c index 4506795177..70be723c50 100644 --- a/bsp/stm32f429-armfly/drivers/drv_ft5x06.c +++ b/bsp/stm32f429-armfly/drivers/drv_ft5x06.c @@ -157,7 +157,7 @@ static int ft5x06_dump(void) DEBUG_PRINTF("[FTS] Touch Chip\r\n"); - for (i = 0; i <= 255; i++) + for (i = 0; i < UINT8_MAX; i++) { _ft5x06_read(i, ®_value, 1);