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

Bugs in example code, problems with force mode and missing ioctl #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 2, 2021

  1. Update linux_userspace.c

    How did you make this work?
    Like this, ioctl is never started and device address is nowhere used. Besides that, setting dev_addr was done after ioctl call,
    Consequently, it failed.
    With the proposed changed it runs on my Raspberry Pi Zero. 
    
    Nevertheless the proposed force mode code only returns static values. 
    Could be fixed by using the normal mode with code as proposed in the project's documentation.
    
    Error handling for user read would be fine, but ok, it's up to each user.
    Still I have some doubts when I compare this to I2C read&write methods of WiringPi, which calls ioctl before each access.
    Did not follow up here, but guess it's needed when you want to access different devices within a program.
    fhwe71 authored Mar 2, 2021
    Configuration menu
    Copy the full SHA
    4f7db69 View commit details
    Browse the repository at this point in the history