On Thu, 2011-02-03 at 15:00 -0600, Jeff Epler wrote:
> Oh, I think I understand better what you're asking now.
> 
> Are you asking whether a hardware driver that uses a parport must be
> built on the hal component called "hal_parport"?  

Not really.

> Absolutely not!  The
> interface of hal_parport (17 or so 'bit' pins that can be read or
> written once per period) is pretty inconvenient for lots of
> sophisticated parport-attached devices, such as any EPP device.
> 
> However, your driver *should* use a port registration method 

This is what I was looking for.

> (the best
> being hal_parport_get, which internally uses whichever lower-level
> method is appropriate, parport_find+parport_claim or request_region) in
> order to make sure that while emc is running, only one device is trying
> to access those low-level port addresses.
> 
> Jeff

My thinking is that the drivers I've looked at require the user to
supply a base port address. The only way two drivers could try to use
the same port resources would be if the user typed in the same address
for both drivers by mistake. A printer on a normal Linux PC would be
different because it can negotiate the resources with Linux and the user
just prints to the printer's name. I suppose EMC2 could do the same
but ... I think I got an ah ha. I could enter 0 or 1 into the driver
config, then hal_parport would assign a known port to the driver, then
it would be up to me to find which port to plug the device into. I don't
think I've ever seen an example config file that does that. Is this
worth the extra complexity? I suppose if I don't write my driver to
comply I could break any other driver that does comply and uses some
form of automatic resource assignment. This also hints that I should
write two drivers, a generic parallel port driver and a separate
peripheral device driver.

Thanks for the help Jeff.

UPS just got here with my Sunix card, gotta go.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to