Giter Site home page Giter Site logo

pstolarz / w1-gpio-cl Goto Github PK

View Code? Open in Web Editor NEW
21.0 8.0 9.0 157 KB

Command line configured kernel mode 1-wire bus master driver. w1-gpio standard Linux module enhancement/substitution.

License: GNU General Public License v2.0

Makefile 21.23% C 78.77%
one-wire ds18b20 linux kernel driver gpio bus-master data-wire-gpio linux-kernel gpio-pins

w1-gpio-cl's People

Contributors

krzysztofosuch avatar pstolarz avatar robertfchapman avatar

Stargazers

 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  avatar  avatar

w1-gpio-cl's Issues

Modify timeout value for 1W device scan

Hey,

I'm using this driver on my Jetson Nano computer to work with W1 devices. It has w1_master_timeout value set to 10 s by default. It is too little, and I would like to change this value to 1 s. Could you pls tell me how to configure it?

Compilation Prerequisite Details?

Hi, This 1-wire bus driver looks exceptionally usefull, if I can get it to work!
I'm trying to get two 1-wire interfaces to run on a Pi Zero without major re-work of the operating system, and your work here looks like exactly whats required.
I tried to run the following via terminal on a freshly installed copy of the latest Rasbian jessie (25/11/16) on a raspberry pi zero;

sudo git clone https://github.com/pstolarz/w1-gpio-cl.git
cd w1-gpio-cl
modprobe wire
sudo make
insmod ./w1-gpio-cl.ko m1="gdt:GPIO1"

However as you can see from the log below, the Make process failed, and w1-gpio-cl.ko was not produced. I guess that this is because I've not provided the prerequisites you mention in the README. Assuming this is the case, any chance that you could include a more step by step guide in the README? or point out the thing I'm doing wrong?
Many thanks in anticipation!
Richard

log
pi@raspberrypi:~ $ sudo git clone https://github.com/pstolarz/w1-gpio-cl.git
Cloning into 'w1-gpio-cl'...
remote: Counting objects: 63, done.
remote: Total 63 (delta 0), reused 0 (delta 0), pack-reused 63
Unpacking objects: 100% (63/63), done.
Checking connectivity... done.
pi@raspberrypi:~ $ cd w1-gpio-cl
pi@raspberrypi:/w1-gpio-cl $ modprobe wire
pi@raspberrypi:~/w1-gpio-cl $ sudo make
`gen-mast.h' has been generated.

NOTE: The compiled module needs w1 set of headers, which is a part of the internal
(not the public) part of the w1 API. The headers are contained in the full Linux
kernel source tree.
Since the kernel sources has not been detected on this platform, the compilation
process will use headers which are part of this source bundle (included in
./w1-internal directory). Linux kernel API is not persistent across versions, so
it is STRONGLY recommended to set ./w1 symbolic link to `drivers/w1' subdirectory
of the target kernel sources. This way proper w1 headers will be used.

Press ENTER to continue...
make -C /lib/modules/4.4.34+/build M= modules
make[1]: *** /lib/modules/4.4.34+/build: No such file or directory. Stop.
Makefile:13: recipe for target 'all' failed
make: *** [all] Error 2

Build error on Fedora kernel 6.6

Running Fedora on kernel 6.6 and I'm getting the following error:

# /usr/bin/gmake all NUM_THREADS=4
NOTE: ./w1 symlink is already set and will not be updated. Remove it and restart the compilation process in case you want to re-run the kernel sources examination.
NOTE: gen-mast.h was generated
/usr/bin/gmake -C /lib/modules/6.6.14-200.fc39.aarch64/build M=/usr/local/src/w1-gpio-cl modules
gmake[1]: Entering directory '/usr/src/kernels/6.6.14-200.fc39.aarch64'
  CC [M]  /usr/local/src/w1-gpio-cl/w1-gpio-cl.o
/usr/local/src/w1-gpio-cl/w1-gpio-cl.c: In function ‘init_module’:
/usr/local/src/w1-gpio-cl/w1-gpio-cl.c:497:46: error: ‘GPIOF_OPEN_DRAIN’ undeclared (first use in this function)
  497 |                         GPIOF_IN | (mdt.od ? GPIOF_OPEN_DRAIN : 0),
      |                                   

Looks like GPIOF_OPEN_DRAIN was removed in 6.5

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.