Giter Club home page Giter Club logo

cupi's People

Contributors

darayus avatar inre avatar obi-jan-kenobi avatar steveklabnik avatar tafia avatar timvisee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cupi's Issues

Documentation

Is there any documentation?

  • the link in the readme doesn't work
  • when going on docs.rs, there is no comments, only function signatures

I've read the examples, there are parts I don't fully understand.

For instance, is this comment supposed to enlighten the reader about some functionality or has it been put here for debug purpose (I don't know what export does)?

    let cupi = CuPi::new().unwrap();
    let mut pinout = cupi.pin(0).unwrap().high().output();
    //let mut pin = cupi.pin_sys(0).unwrap();
    //pin.export().unwrap();
    //let mut pinout = pin.output().unwrap();

Incorrect revision-detection in cupi/src/board.rs

Hello,

I just noticed that the // old way code at the bottom of cupi/src/board.rs is wrong.
I'm not a Rust programmer, but it seems to be treating revisions "0005" and "0009" the same (RaspberryModel::B) but if you look at http://elinux.org/RPi_HardwareHistory you can see that "0005" is indeed a Model B, but "0009" is actually a Model A! And you make a similar mistake with "0007" (again, Model A and not Model B)

And less importantly, "000f" (made by Qisda and not Egoman) and "0014" (made by Embest and not Sony).

BCM2835 is not supported

Raspberry Pi comes with BCM2835, but CuPi lists BCM2708 and BCM2709.

The enumeration in board.rs should be expanded to include BCM2835.

Cannot compile cupi in my project - transitive dependency problems?

I'm trying to compile the blink example project on my Raspberry Pi Zero W, but the build command fails as it tries to compile cupi. I'm getting this terminal output:

$ cargo build --verbose
       Fresh byteorder v1.2.1
       Fresh libc v0.2.39
       Fresh winapi-build v0.1.1
       Fresh cfg-if v0.1.2
       Fresh bitflags v0.3.3
       Fresh bitflags v0.4.0
       Fresh winapi v0.2.8
       Fresh libc v0.1.12
       Fresh semver v0.1.20
       Fresh void v1.0.2
       Fresh bitflags v1.0.1
       Fresh iovec v0.1.2
       Fresh rand v0.4.2
       Fresh rustc_version v0.1.7
       Fresh bytes v0.4.6
       Fresh nix v0.10.0
       Fresh kernel32-sys v0.2.2
       Fresh remove_dir_all v0.3.0
       Fresh nix v0.6.0
       Fresh tempdir v0.3.6
       Fresh spidev v0.3.0
       Fresh mmap v0.1.1
   Compiling cupi v0.1.0
     Running `rustc --crate-name cupi /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/cupi-0.1.0/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=409ed042e1991471 -C extra-filename=-409ed042e1991471 --out-dir /home/pi/cupi-test/target/debug/deps -L dependency=/home/pi/cupi-test/target/debug/deps --extern spidev=/home/pi/cupi-test/target/debug/deps/libspidev-a197c99928c90dc7.rlib --extern bitflags=/home/pi/cupi-test/target/debug/deps/libbitflags-b4df5465fcb6918f.rlib --extern libc=/home/pi/cupi-test/target/debug/deps/liblibc-d67d33f8bf527dba.rlib --extern mmap=/home/pi/cupi-test/target/debug/deps/libmmap-492832427199866f.rlib --extern nix=/home/pi/cupi-test/target/debug/deps/libnix-f1ec6b05c8d84a61.rlib --cap-lints allow`
error[E0432]: unresolved import `nix::sys::ioctl::libc`
  --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/cupi-0.1.0/src/lib.rs:62:22
   |
62 | use nix::sys::ioctl::libc::geteuid;
   |                      ^^^^ Could not find `libc` in `ioctl`

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0432"
error: Could not compile `cupi`.

I'm still very much a Rust noob, so does this mean I'm having problems with dependency versions within nix, libc, and ioctl? Should I try to pin one of these versions in my lockfile, or is there something else I should try?

Thanks!

How to set GPIO mode, e.g ALT0?

I can't find anywhere in the docs how to change the mode of a pin, which I need for toggling between UART and other modes on Raspberry Pi 3B+.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.