소스 검색

Uses const UINT8_MAX for max value of uint8_t type; Fixes loop condition.

Valeriy Van 7 년 전
부모
커밋
bea1115ff1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      bsp/stm32f429-armfly/drivers/drv_ft5x06.c

+ 1 - 1
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, &reg_value, 1);