File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ where
453
453
{
454
454
_marker : core:: marker:: PhantomData < T > ,
455
455
tx_buf : & ' a mut [ u8 ] ,
456
- written : u16 ,
456
+ written : usize ,
457
457
}
458
458
459
459
/// Interface for the RX part of a UART instance that can be used independently of the TX part.
@@ -588,9 +588,8 @@ pub mod serial {
588
588
return Err ( nb:: Error :: WouldBlock ) ;
589
589
}
590
590
591
- let written = self . written as usize ;
592
- if written < self . tx_buf . len ( ) {
593
- self . tx_buf [ written] = b;
591
+ if self . written < self . tx_buf . len ( ) {
592
+ self . tx_buf [ self . written ] = b;
594
593
self . written += 1 ;
595
594
Ok ( ( ) )
596
595
} else {
@@ -662,7 +661,7 @@ pub mod serial {
662
661
uarte
663
662
. txd
664
663
. maxcnt
665
- . write ( |w| unsafe { w. maxcnt ( ) . bits ( self . written ) } ) ;
664
+ . write ( |w| unsafe { w. maxcnt ( ) . bits ( self . written as _ ) } ) ;
666
665
667
666
// Start UARTE Transmit transaction.
668
667
// `1` is a valid value to write to task registers.
You can’t perform that action at this time.
0 commit comments