Skip to content

Commit 7438d18

Browse files
author
Tanek
authored
Merge pull request #1249 from valeriyvan/fixindefiniteloop
Uses const UINT8_MAX for max value of uint8_t; Fixes loop condition.
2 parents fa693c5 + bea1115 commit 7438d18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bsp/stm32f429-armfly/drivers/drv_ft5x06.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static int ft5x06_dump(void)
157157

158158
DEBUG_PRINTF("[FTS] Touch Chip\r\n");
159159

160-
for (i = 0; i <= 255; i++)
160+
for (i = 0; i < UINT8_MAX; i++)
161161
{
162162
_ft5x06_read(i, &reg_value, 1);
163163

0 commit comments

Comments
 (0)