Giter VIP home page Giter VIP logo

raspi-pacs's People

Contributors

abt8601 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

raspi-pacs's Issues

bcm2837-lpa unable to extract on Windows

I realize this is generated code, so if this issue should be in the SVD2Rust repo I will move it there.

The bcm2837-lpa crate includes an aux module that causes the crate to be uncompileable on Windows. This is because aux is one of the few names that files aren't allowed to be named on Windows.

BCM2711 segfaults trying to read UART

I'm trying to use the BCM2711-lpa crate to read the registers on the UART0 on a Raspberry Pi 4. I'm successfully able to "steal" the peripherals, but when trying to read the registers, I'm getting a segmentation fault. I've double checked that my Bluetooth is disabled and that UART is enabled in my config.txt, is there something else I need to set up before I can my program? Any help is appreciated.

My code:

fn main() {
    let uart = unsafe {bcm2711_lpa::Peripherals::steal() }.UART0;
    println!("stole peripherals");
    
    let ifls = uart.ifls();
    println!("got IFLS");
    let imsc = uart.imsc();
    println!("got IMSC");

    let r1 = ifls.read().bits();
    println!("read ifls");
    let r2 = imsc.read().bits();
    println!("read imsc");
    let m1 = r1 & RXIFLSEL;
    let m2 = r2 & RXIM;

    println!("ifls read: {:#34b}, {:#18b}", r1, m1);
    println!("imsc read: {:#34b}, {:#18b}", r2, m2);
   
}

output:

stole peripherals
got IFLS
got IMSC
Segmentation fault

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.