123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- use crate::memory_range::Physical;
- use spec::binary::SbiRet;
- pub trait Console {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- fn write(&self, bytes: Physical<&[u8]>) -> SbiRet;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- fn read(&self, bytes: Physical<&mut [u8]>) -> SbiRet;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- fn write_byte(&self, byte: u8) -> SbiRet;
- }
- impl<T: Console> Console for &T {
- #[inline]
- fn write(&self, bytes: Physical<&[u8]>) -> SbiRet {
- T::write(self, bytes)
- }
- #[inline]
- fn read(&self, bytes: Physical<&mut [u8]>) -> SbiRet {
- T::read(self, bytes)
- }
- #[inline]
- fn write_byte(&self, byte: u8) -> SbiRet {
- T::write_byte(self, byte)
- }
- }
|