A Parallel port driver using Linux ioperm/outb. More...
#include <ParallelPort.hpp>
Public Member Functions | |
ParallelPort (unsigned short int address=0x378) | |
Create a new Parallelport with a base address. | |
ParallelPort (const std::string &name, unsigned short int address=0x378) | |
Create a new Parallelport with a given name and base address. | |
void | switchOn (unsigned int bit) |
void | switchOff (unsigned int bit) |
void | setBit (unsigned int bit, bool value) |
void | setSequence (unsigned int start_bit, unsigned int stop_bit, unsigned int value) |
bool | checkBit (unsigned int bit) const |
unsigned int | checkSequence (unsigned int start_bit, unsigned int stop_bit) const |
unsigned int | nbOfOutputs () const |
A Parallel port driver using Linux ioperm/outb.
It is thread-safe, but can handle only 1 parallel port per instance. You need to instantiate this object in every thread where you want to access the port. If the threads write to different pins, they are guaranteed not to clear out each others data.
Definition at line 47 of file ParallelPort.hpp.
ParallelPort | ( | unsigned short int | address = 0x378 |
) |
Create a new Parallelport with a base address.
It can be used by the Orocos Thread system to output task scheduling block-sequences. You must try/catch this constructor.
address | The base address of the parallel port |
exception | if operation not allowed. |
Definition at line 59 of file ParallelPort.cpp.
ParallelPort | ( | const std::string & | name, | |
unsigned short int | address = 0x378 | |||
) |
Create a new Parallelport with a given name and base address.
It can be used by the Orocos Thread system to output task scheduling block-sequences. You must try/catch this constructor.
address | The base address of the parallel port | |
name | The name of this instance |
exception | if operation not allowed. |
Definition at line 37 of file ParallelPort.cpp.