36 lines
1.2 KiB
Markdown
36 lines
1.2 KiB
Markdown
> this is a fork of: [rp-usb-serial](https://github.com/sndnvaps/rp-usb-serial)
|
|
> i have added more functionality, on top of his/hers construction
|
|
> - credits to sndnvaps
|
|
|
|
# USB Terminal
|
|
|
|
this crate was created to give a smooth console that handles backspace and output with some color.
|
|
the original rp-usb-serial crate was a good foundation to build on in my journey to learning embedded rust.
|
|
|
|
## compiling the example
|
|
|
|
to compile just run:
|
|
```bash
|
|
cargo build --example print-banner
|
|
```
|
|
|
|
<p align="center">
|
|
<img src="https://webchat.puckoprutt.tech/public.php/dav/files/n38qRnz2b8QP5fe/" width="650" alt="compiling.." />
|
|
</p>
|
|
|
|
## running the example
|
|
|
|
When running the example it should look like this:
|
|
|
|
<p align="center">
|
|
<img src="https://webchat.puckoprutt.tech/public.php/dav/files/Q6Sg2mLSsdfqxCR/" width="650" alt="running example.." />
|
|
</p>
|
|
|
|
its made for terminals that can take ANSI-sequence (im guessing most of them do..) and it uses simple standard 8 colors.
|
|
example showing how to get notified when user presses enter and work with the whole line. and also how to split line into word.
|
|
usually word 0 is a command and the rest of words are arguments.
|
|
|
|
## check out the example source
|
|
|
|
just check in src/example
|