File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -525,7 +525,7 @@ int i2c_byte_read(i2c_t *obj, int last) {
525
525
timeout = FLAG_TIMEOUT ;
526
526
while (__HAL_I2C_GET_FLAG (handle , I2C_FLAG_RXNE ) == RESET ) {
527
527
if ((timeout -- ) == 0 ) {
528
- return 2 ;
528
+ return -1 ;
529
529
}
530
530
}
531
531
@@ -622,7 +622,7 @@ int i2c_byte_read(i2c_t *obj, int last) {
622
622
while (!__HAL_I2C_GET_FLAG (handle , I2C_FLAG_TCR )) {
623
623
if ((timeout -- ) == 0 ) {
624
624
DEBUG_PRINTF ("timeout in byte_read\r\n" );
625
- return 2 ;
625
+ return -1 ;
626
626
}
627
627
}
628
628
}
@@ -637,7 +637,7 @@ int i2c_byte_read(i2c_t *obj, int last) {
637
637
timeout = FLAG_TIMEOUT ;
638
638
while (!__HAL_I2C_GET_FLAG (handle , I2C_FLAG_RXNE )) {
639
639
if ((timeout -- ) == 0 ) {
640
- return 2 ;
640
+ return -1 ;
641
641
}
642
642
}
643
643
You can’t perform that action at this time.
0 commit comments