Closed chrisdew closed 9 years ago
This is rust issue: use zinc::drivers::chario::CharIO;
You need to use
it in the correct scope of func
, or globally for the whole file.
Also mind that pt::run_args
is opaque type which might contain implicit trait typization further expanded by #[zinc_task]
, so in general case it's not safe to pass it down.
Thanks for explaining that.
Is there a better way to output debug to the serial port, from random places in a program?
(I do understand that Zinc is experimental, so 'no' is an understandable answer.)
Is there a logging framework for Rust that is small enough to use?
On 18 November 2014 17:01, Chris Dew notifications@github.com wrote:
Thanks for explaining that.
Is there a better way to output debug to the serial port, from random places, all over a program?
— Reply to this email directly or view it on GitHub https://github.com/hackndev/zinc/issues/239#issuecomment-63439997.
There is os::debug
for generic debug case. It's not exactly safe, but it's globally available if you pass it an UART during initialisation.
Thanks, I'll try os::debug
.
First, apologies for not using a mailing list - I've searched (in-page) for "mail" in https://github.com/hackndev/zinc and http://zinc.rs/ but found nothing.
I'm trying to use the
uart
(and otherrun_args
) from outside therun
function.Adding just a small quantity of code:
to the app_uart.rs causes it to fail to compile with:
run_args
, or (more likely) something stupid in what I'm trying to do?uart
(and otherrun_args
) be accessed form outside of the mainrun
function?P.S. It all compiles and runs perfectly until I try to use the uart from a function other than
run
. P.P.S. Full source: