pub fn console_write(bytes: Physical<&[u8]>) -> SbiRet
Expand description
Write bytes to the debug console from input memory.
§Parameters
The bytes
parameter specifies the input memory, including its length
and memory physical base address (both lower and upper bits).
§Non-blocking function
This is a non-blocking SBI call, and it may do partial or no write operations if the debug console is not able to accept more bytes.
§Return value
The number of bytes written is returned in SbiRet.value
and the
possible return error codes returned in SbiRet.error
are shown in
the table below:
Return code | Description |
---|---|
SbiRet::success() | Bytes written successfully. |
SbiRet::invalid_param() | The memory pointed to by bytes does not satisfy the requirements described in shared memory physical address range. |
SbiRet::failed() | Failed to write due to I/O errors. |
This function is defined in RISC-V SBI Specification chapter 12.1.