Skip to content

Parallel port source code written in C for MATLAB/Octave in Linux. To be compiled in mex.

License

Notifications You must be signed in to change notification settings

benoitberanger/parport_cenir

Repository files navigation

Parallel port source code written in C for MATLAB/Octave in Linux. To be compiled in mex.

Purpose

When compiled (see below), this program ppmex allows you to send messages through the parallel port (DB25) on a Linux system, via MATLAB or Octave.

Test if you can compile MEX files

In helloworld-test-compile-mex subdir, you will find helloworldMEX.c.
When, in MATLAB/Octave, you are in this folder, enter mex -O helloworldMEX.c.
If the compilation is complet, you should have a new file such as helloworldMEX.mex*

Compilation

When you have tested the compilation process (see above), simply type mex -O -v ppmex.c in the root dir.
The warning about the line #21 extern int pport = 0; is nothing to worry about.
When completed, a file ppmex.mex* should have been created.

Usage

ppmex('open')          : opens  the device, and get it ready to send messages  
ppmex('write',message) : sends  the message = {0, 1, 2, ..., 255} uint8  
ppmex('close')         : closes the device  

About

Parallel port source code written in C for MATLAB/Octave in Linux. To be compiled in mex.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published