Using the PuffinPLC

M

Thread Starter

Mario de Sousa

"Ken Emmons, Jr." wrote: > > Hello Mario, Curt, Jiri, and company ... > > I am interested in experimenting with the source code (finally). I will be writing my logic module in C and calling the Puffin API in order to access points, etc. I would like to get started with the existing code and compile and run it, etc. Should I have a CVS account or can I download it from the web?? What is the best way to access everything?? May I sugest you get it directly from cvs using the public login/passwd pair? Please check out http://www.linuxplc.org/doc/cvs.html Quoting from that page... ****************** If you don't have a username, you can get read-only access by using "linuxplc", with the password "OpenSource", like this: cvs -d :pserver:[email protected]:/home/plccvs login This only needs to be done only ONCE, not everytime you access CVS. Now to get the source code. Create a new directory, change into it, and do the command: cvs -d :pserver:[email protected]:/home/plccvs -z3 checkout . (don't forget the dot at the end of the command). The -z3 option turns on compression. If you wish, later, you can checkout several times into separate directories. ***************** I then sugest you change directory to /demo/xxxxx, and run make from there to run each demo. The make command should be able to go and compile all required modules and libraries, and then launch the demo, all in one go. You might like to check the file /demo/basic/chaser.c as an example module written directly in c code. > > I want to see how C modules can co-exist with the puffin PLC as well as seeing what it takes to write drivers for custom hardware. > Drivers for custom hardware have two sides to them: a)- a linux kernel driver to access the physical io b)- a puffinPLC module to interact with the linux kernel driver Alternatively, you may be able to skip the linux kernel driver and access your hardware directly from the puffinPLC module. With the new io library, to write a puffinPLC IO module (b) you only need to implement the functions declared in the /lib/io/io_hw.h file. You may like to skim through the parport module source code. /io/parport/parport.c implements the functions declared in io_hw.h It uses the /io/parport/parport_util.c to access the physical IO. The parport_util.c file can access the parport either: - through a linux kernel device driver (ppt_init_krn() ) - directly accessing the PC's io ports (ppt_init_dir() ) Any questions, just ask... Enjoy, Mario. -- ---------------------------------------------------------------------------- Mario J. R. de Sousa [email protected] ---------------------------------------------------------------------------- The box said it requires Windows 95 or better, so I installed Linux _______________________________________________ LinuxPLC mailing list [email protected] http://linuxplc.org/mailman/listinfo/linuxplc
 
Thanks. I will have to get my Linux machine dialing up to my ISP ... which is something else I have been meaning to do. This will give me a good excuse :eek:) I like the ability to access the hardware from both Linux and via a Kernel module because I plan on using RTLinux when I am finished, which runs as a kernel module anyway. Sounds good. Thanks again Mario, ~Ken Kenneth Emmons Jr QA Technology Company, Inc. _______________________________________________ LinuxPLC mailing list [email protected] http://linuxplc.org/mailman/listinfo/linuxplc
 
Top