/** Receive data from UART (blocks for at least one byte if the buffer can hold one, returns number
 * of bytes received) */
Receive data from UART (blocks for at least one byte if the buffer can hold one, returns number
of bytes received)
Receive data from UART ( blocks for at least one byte if the buffer can hold one returns number of bytes received )
pub fn recv(s: &mut [u8]) -> usize {
    if s.len() == 0 {
        return 0;
    }
    loop {
        let n = recv_nb(s);
        if n != 0 {
            return n;
        }
        unsafe { asm::wfi(); }
    }
}
pub fn recv ( s : & mut [ u8 ] ) -> usize { if s . len ( ) == 0 { return 0 ; } loop { let n = recv_nb ( s ) ; if n != 0 { return n ; } unsafe { asm :: wfi ( ) ; } } }
Receive data from UART (blocks for at least one byte if the buffer can hold one, returns number
 of bytes received)
Receive data from UART ( blocks for at least one byte if the buffer can hold one returns number of bytes received )
s
&mut [u8]