From 0d02342b2d9fba686ae10caee8486141f20848c5 Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Wed, 4 Aug 2021 08:34:30 +0200 Subject: [PATCH] Rename bread -> read_blocking --- embassy-stm32/src/usart/v1.rs | 2 +- embassy-stm32/src/usart/v2.rs | 2 +- examples/stm32f4/src/bin/usart.rs | 2 +- examples/stm32h7/src/bin/usart.rs | 2 +- examples/stm32l4/src/bin/usart.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/embassy-stm32/src/usart/v1.rs b/embassy-stm32/src/usart/v1.rs index 24530354..9e9b4930 100644 --- a/embassy-stm32/src/usart/v1.rs +++ b/embassy-stm32/src/usart/v1.rs @@ -96,7 +96,7 @@ impl<'d, T: Instance, TxDma, RxDma> Uart<'d, T, TxDma, RxDma> { Ok(()) } - pub fn bread(&mut self, buffer: &mut [u8]) -> Result<(), Error> { + pub fn read_blocking(&mut self, buffer: &mut [u8]) -> Result<(), Error> { unsafe { let r = self.inner.regs(); for b in buffer { diff --git a/embassy-stm32/src/usart/v2.rs b/embassy-stm32/src/usart/v2.rs index 63e849ba..694b1618 100644 --- a/embassy-stm32/src/usart/v2.rs +++ b/embassy-stm32/src/usart/v2.rs @@ -100,7 +100,7 @@ impl<'d, T: Instance, TxDma, RxDma> Uart<'d, T, TxDma, RxDma> { Ok(()) } - pub fn bread(&mut self, buffer: &mut [u8]) -> Result<(), Error> { + pub fn read_blocking(&mut self, buffer: &mut [u8]) -> Result<(), Error> { unsafe { let r = self.inner.regs(); for b in buffer { diff --git a/examples/stm32f4/src/bin/usart.rs b/examples/stm32f4/src/bin/usart.rs index 40e862f5..a068df52 100644 --- a/examples/stm32f4/src/bin/usart.rs +++ b/examples/stm32f4/src/bin/usart.rs @@ -33,7 +33,7 @@ fn main() -> ! { let mut buf = [0u8; 1]; loop { - usart.bread(&mut buf).unwrap(); + usart.read_blocking(&mut buf).unwrap(); usart.bwrite_all(&buf).unwrap(); } } diff --git a/examples/stm32h7/src/bin/usart.rs b/examples/stm32h7/src/bin/usart.rs index 88420ae3..7bdd3f00 100644 --- a/examples/stm32h7/src/bin/usart.rs +++ b/examples/stm32h7/src/bin/usart.rs @@ -34,7 +34,7 @@ async fn main_task() { let mut buf = [0u8; 1]; loop { - usart.bread(&mut buf).unwrap(); + usart.read_blocking(&mut buf).unwrap(); usart.bwrite_all(&buf).unwrap(); } } diff --git a/examples/stm32l4/src/bin/usart.rs b/examples/stm32l4/src/bin/usart.rs index c71825bf..ebe06dc2 100644 --- a/examples/stm32l4/src/bin/usart.rs +++ b/examples/stm32l4/src/bin/usart.rs @@ -33,7 +33,7 @@ fn main() -> ! { let mut buf = [0u8; 1]; loop { - usart.bread(&mut buf).unwrap(); + usart.read_blocking(&mut buf).unwrap(); usart.bwrite_all(&buf).unwrap(); } }