mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
"fix" cramium-fpga target
this doesn't have the udma uart so just bypass that new code
This commit is contained in:
parent
661b832d7e
commit
24cfa557af
1 changed files with 37 additions and 29 deletions
|
|
@ -211,6 +211,8 @@ impl OutputWriter {
|
||||||
/// bytes written. This is mostly compatible with `std::io::Write`,
|
/// bytes written. This is mostly compatible with `std::io::Write`,
|
||||||
/// except it is infallible.
|
/// except it is infallible.
|
||||||
pub fn write(&mut self, buf: &[u8]) -> usize {
|
pub fn write(&mut self, buf: &[u8]) -> usize {
|
||||||
|
#[cfg(feature="cramium-soc")]
|
||||||
|
{
|
||||||
// write the whole buffer via DMA, and then idle with yield_slice() for better
|
// write the whole buffer via DMA, and then idle with yield_slice() for better
|
||||||
// concurrency (as opposed to character-by-character polling).
|
// concurrency (as opposed to character-by-character polling).
|
||||||
|
|
||||||
|
|
@ -245,6 +247,12 @@ impl OutputWriter {
|
||||||
|
|
||||||
writelen
|
writelen
|
||||||
}
|
}
|
||||||
|
#[cfg(feature="cramium-fpga")]
|
||||||
|
for c in buf {
|
||||||
|
self.putc(*c)
|
||||||
|
}
|
||||||
|
buf.len()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn write_all(&mut self, buf: &[u8]) -> core::result::Result<usize, ()> {
|
pub fn write_all(&mut self, buf: &[u8]) -> core::result::Result<usize, ()> {
|
||||||
Ok(self.write(buf))
|
Ok(self.write(buf))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue