We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 517d0d9 commit 455c2ecCopy full SHA for 455c2ec
targets/TARGET_STM/i2c_api.c
@@ -621,8 +621,8 @@ int i2c_byte_read(i2c_t *obj, int last) {
621
if ((tmpreg & I2C_CR2_RELOAD) != 0) {
622
while (!__HAL_I2C_GET_FLAG(handle, I2C_FLAG_TCR)) {
623
if ((timeout--) == 0) {
624
- printf("timeout in byte_read\r\n");
625
- //return 2;
+ DEBUG_PRINTF("timeout in byte_read\r\n");
+ return 2;
626
}
627
628
@@ -688,8 +688,8 @@ int i2c_byte_write(i2c_t *obj, int data) {
688
689
690
691
- printf("timeout in byte_write\r\n");
692
+ DEBUG_PRINTF("timeout in byte_write\r\n");
693
694
695
0 commit comments