Rename bread -> read_blocking

This commit is contained in:
Ulf Lilleengen 2021-08-04 08:34:30 +02:00
parent 6ff0614cb6
commit 0d02342b2d
5 changed files with 5 additions and 5 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}