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 508508//!
509509//! use hal::prelude::*;
510510//!
511- //! fn flush(serial: &S, cb: &mut CircularBuffer) -> Result<(), S::Error>
511+ //! fn flush<S> (serial: &S, cb: &mut CircularBuffer) -> Result<(), S::Error>
512512//! where
513- //! S: hal::Serial ,
513+ //! S: hal::serial::Write<u8> ,
514514//! {
515515//! loop {
516516//! if let Some(byte) = cb.peek() {
532532//!
533533//! // NOTE private
534534//! static BUFFER: Mutex<CircularBuffer> = ..;
535- //! static SERIAL: Mutex<impl hal::Serial > = ..;
535+ //! static SERIAL: Mutex<impl hal::serial::Write<u8> > = ..;
536536//!
537537//! impl BufferedSerial {
538- //! pub fn write(&self, byte: u8 ) {
538+ //! pub fn write(&self, bytes: &[u8] ) {
539539//! let mut buffer = BUFFER.lock();
540- //! for byte in byte {
540+ //! for byte in bytes {
541541//! buffer.push(*byte).unwrap();
542542//! }
543543//! }
544544//!
545545//! pub fn write_all(&self, bytes: &[u8]) {
546546//! let mut buffer = BUFFER.lock();
547547//! for byte in bytes {
548- //! cb .push(*byte).unwrap();
548+ //! buffer .push(*byte).unwrap();
549549//! }
550550//! }
551- //!
552551//! }
553552//!
554553//! fn interrupt_handler() {
You can’t perform that action at this time.
0 commit comments