On Wed, Oct 21, 2015 at 06:54:38PM +0100, Paul LeoNerd Evans wrote:

> [...] Currently, they all live under the namespace
>     Device::BusPirate::Chip::*

> [...] I'm considering how to name device drivers for talking to
> these hardware chips in a way that's independent of how that chip is
> ultimately connected to the computer, and provide an abstracted API
> that the driver can use to communicate with the chip, regardless of
> this mechanism.

Cool!

The Bus::I2C:: namespace seems safe.  Short, unambiguous, unlikely to
have a legitimate claim from software.

Under that you could put chip names like Bus::I2C::DS1307 [1] but I
suspect software will fit better by function like Bus::I2C::EEPROM [2]
since families of chips will naturally share code.


The CPAN search for just I2C shows a few things,

  https://metacpan.org/release/i2c  (i2c_{ser,lpt})
  https://metacpan.org/pod/HiPi  (various under HiPi::*)
  https://metacpan.org/pod/Device::LPS331AP
  https://metacpan.org/pod/Device::Gyroscope::L3GD20
  https://metacpan.org/pod/Device::SMBus
  https://metacpan.org/pod/Device::WebIO::Device::I2CUser

so it's probably too late to converge on one perfect naming scheme
anyway.


> Ultimately, it'd be cool to end up with lots of hardware chip
> drivers on CPAN that can talk to all kinds of hardware, via whatever
> mechanism people use to physically attach it.
> 
> But lets start with the name...

I don't see a way to avoid the usual problem with someone releasing
Bus::I2C::EEPROM::Lite and Bus::I2C::EEPROM::Tiny after the first come
module gets bloated out with obsolete parts.

-- 
Matthew

[1] 
http://www.rapidonline.com/Electronic-Components/Maxim-DS1307-Timekeeper-with-BCD-Real-Time-Clock-82-0567

[2] 
http://www.rapidonline.com/Electronic-Components/ST-M24C64-WMN6P-EEPROM-64k-SO-8-73-3636
    http://www.rapidonline.com/EEPROMs


-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

Reply via email to