File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 508
508
//!
509
509
//! use hal::prelude::*;
510
510
//!
511
- //! fn flush(serial: &S, cb: &mut CircularBuffer) -> Result<(), S::Error>
511
+ //! fn flush<S> (serial: &S, cb: &mut CircularBuffer) -> Result<(), S::Error>
512
512
//! where
513
- //! S: hal::Serial ,
513
+ //! S: hal::serial::Write<u8> ,
514
514
//! {
515
515
//! loop {
516
516
//! if let Some(byte) = cb.peek() {
532
532
//!
533
533
//! // NOTE private
534
534
//! static BUFFER: Mutex<CircularBuffer> = ..;
535
- //! static SERIAL: Mutex<impl hal::Serial > = ..;
535
+ //! static SERIAL: Mutex<impl hal::serial::Write<u8> > = ..;
536
536
//!
537
537
//! impl BufferedSerial {
538
- //! pub fn write(&self, byte: u8 ) {
538
+ //! pub fn write(&self, bytes: &[u8] ) {
539
539
//! let mut buffer = BUFFER.lock();
540
- //! for byte in byte {
540
+ //! for byte in bytes {
541
541
//! buffer.push(*byte).unwrap();
542
542
//! }
543
543
//! }
544
544
//!
545
545
//! pub fn write_all(&self, bytes: &[u8]) {
546
546
//! let mut buffer = BUFFER.lock();
547
547
//! for byte in bytes {
548
- //! cb .push(*byte).unwrap();
548
+ //! buffer .push(*byte).unwrap();
549
549
//! }
550
550
//! }
551
- //!
552
551
//! }
553
552
//!
554
553
//! fn interrupt_handler() {
You can’t perform that action at this time.
0 commit comments