On Wed, Feb 02, 2011 at 07:58:56AM -0800, Kirk Wallace wrote: > Should a parallel port comp claim and release a port(s) with parport? > Usually the port addresses are assigned manually to each comp so claim > jumping should not be a problem?
Ideally, you'd use the routines from "parport_common.h" in the source distribution. These routines can cooperate with Linux parport detection (which means the user can specify 0 to use parport0, etc) as well as the traditional way (by base address). In either case, the I/O ports are registered for emc2's exclusive use while it's running (by parport_claim or rtapi_request_region, as appropriate). Unfortunately, you can't easily use these right now because the routines are undocumented and the related header is *not* included in the emc2-dev package, only in the source distribution. Here's short "documentation": ------------------------------------------------------------------------ #include "parport_common.h" // in initialization function, such as rtapi_app_main or a comp's // extra_setup hal_parport_t port; err = hal_parport_get(comp_id, &port, base, base_hi, 0); if(err < 0) return err; // and do any other required cleanup // now use port.base and port.base_hi addresses for inb/outb status = inb(port.base+1) & 1; // check status bit // in teardown function, such as rtapi_app_exit or a comp's // extra_cleanup hal_parport_release(&port); ------------------------------------------------------------------------ I'll try to get a manpage written and the file installed in git master .. probably the header will be renamed to have a "hal" prefix, maybe "hal_parport.h". Jeff ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers