Rename bread -> read_blocking
This commit is contained in:
parent
6ff0614cb6
commit
0d02342b2d
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user