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

What should we adopt from Zinc? #4

Open
zsup opened this issue Jan 27, 2016 · 3 comments
Open

What should we adopt from Zinc? #4

zsup opened this issue Jan 27, 2016 · 3 comments

Comments

@zsup
Copy link
Owner

zsup commented Jan 27, 2016

https://zinc.rs/
https://github.com/hackndev/zinc

@dbrgn
Copy link

dbrgn commented Jan 27, 2016

Maybe @farcaller @kvark @mcoffin @posborne can give us some pointers? It would be great if we could avoid duplication of development.

@farcaller
Copy link

I intend to move zinc into a direction where you'd just define HAL (ioregs + peripheral traits) in a crate, add it as a dependency and call it a day. Obviously, zinc is nowhere there yet (it's not a commercial project, but a research one), so there aren't even that much peripheral traits to implement. Still, I think that is how I foresee zinc to be used.

There is little sense to use zinc as a foundation, as pretty much everything is scattered there, but if you want to contribute back it would be nice to see some actual traits for peripherals to be defined.

On what you can reuse — ioregs are pretty useful and stable API as is VolatileCell. The OS part features a scheduler that should be reasonably stable, but it's very basic.

@posborne
Copy link

I agree with @farcaller's sentiment regarding peripheral traits. For instance, if there were traits for accessing peripherals such as the following, drivers/code could be written on top of these that would support multiple platforms (including test platforms):

  • Digital IO
  • Analog IO
  • PWM
  • I2C Bus
  • SPI Bus
  • UART

How each of these are set up is going to vary platform-to-platform but I believe it would be invaluable to have traits defining the standard API for basic access to these peripherals available.

I myself have a few libraries available that currently only support Linux which I would like to have implement traits that are shared with other projects:

I started trying to tackle the GPIO/Digital IO trait problem here: https://github.com/posborne/rust-gpio

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

4 participants