File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -309,7 +309,9 @@ macro_rules! i2c {
309
309
* byte = self . i2c. rxdr. read( ) . rxdata( ) . bits( ) ;
310
310
}
311
311
312
- // automatic STOP
312
+ // Wait for STOP
313
+ busy_wait!( self . i2c, stopf, bit_is_set) ;
314
+ self . i2c. icr. write( |w| w. stopcf( ) . set_bit( ) ) ;
313
315
314
316
Ok ( ( ) )
315
317
}
@@ -344,7 +346,9 @@ macro_rules! i2c {
344
346
self . i2c. txdr. write( |w| unsafe { w. txdata( ) . bits( * byte) } ) ;
345
347
}
346
348
347
- // automatic STOP
349
+ // Wait for STOP
350
+ busy_wait!( self . i2c, stopf, bit_is_set) ;
351
+ self . i2c. icr. write( |w| w. stopcf( ) . set_bit( ) ) ;
348
352
349
353
Ok ( ( ) )
350
354
}
@@ -385,7 +389,9 @@ macro_rules! i2c {
385
389
* byte = self . i2c. rxdr. read( ) . rxdata( ) . bits( ) ;
386
390
}
387
391
388
- // automatic STOP
392
+ // Wait for STOP
393
+ busy_wait!( self . i2c, stopf, bit_is_set) ;
394
+ self . i2c. icr. write( |w| w. stopcf( ) . set_bit( ) ) ;
389
395
390
396
Ok ( ( ) )
391
397
}
You can’t perform that action at this time.
0 commit comments