Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does this interact with bl602-hal #1

Open
Kethku opened this issue Aug 29, 2021 · 2 comments
Open

How does this interact with bl602-hal #1

Kethku opened this issue Aug 29, 2021 · 2 comments

Comments

@Kethku
Copy link

Kethku commented Aug 29, 2021

I'm interested in using the bl602 as a driver for the dwm1000 ultra wideband transceiver. However I don't think it makes sense to create a rust driver based on a hardware abstraction layer which isn't portable to other devices.

One of the appeals of the bl602 is that it can communicate over wifi and is so low power in sleep mode. These qualities make it seem like a great cheaper replacement for the more expensive esp32 which I've also been playing with. Plus being risk-v means that the rust compiles for it pretty much natively as apposed to requiring a janky fork of the compiler like the espressif toolchain.

So my question is how does this sdk interact with the bl602-hal https://github.com/sipeed/bl602-hal. I think I need to use this sdk in order to access wifi capabilities, but I'd rather not use it when communicating over spi to the dwm1000 because it would be better to create an abstract driver based on the embedded-rust traits.

Maybe I'm asking the wrong questions? I'm pretty new to all this (embedded hardware work) so any guidance would be greatly appreciated!

@Kethku
Copy link
Author

Kethku commented Aug 29, 2021

Further investigation shows an existing implementation of the dwm1000 driver here https://docs.rs/dw1000/0.5.0/dw1000/ so now I'm even more motivated to find a way to use the bl602-hal along with the sdk at the same time!

@lupyuen
Copy link
Owner

lupyuen commented Aug 30, 2021

Hi: Your project sounds really interesting! The two Rust APIs are totally different, they don't share any code...

  1. bl602-hal is the Pure Rust implementation of the BL602 HAL. If we're porting a driver that depends on the Rust Embedded HAL Framework (like dw1000), we should use bl602-hal

  2. bl602-rust-wrapper is a Rust Wrapper for the BL602 IoT SDK (in C). So it follows the conventions of the BL602 IoT SDK, not the Rust Embedded HAL.

(Someday we might build another wrapper around bl602-rust-wrapper to make it look like Rust Embedded HAL. But no plans yet)

I suggest you have a chat with the bl602-hal team? They are fairly active (I have friends there) and I think they would be happy to work with you :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants