Groups | Search | Server Info | Login | Register
Groups > perl.module-authors > #3254
| Newsgroups | perl.module-authors |
|---|---|
| Date | 2015-10-22 11:39 +0100 |
| Subject | Re: Module heirarchy naming for SPI/I²C device drivers |
| Message-ID | <20151022103900.GG4420@sanger.ac.uk> (permalink) |
| References | <20151021185438.50ac7052@shy.leonerd.org.uk> |
| From | mca@sanger.ac.uk (Matthew Astley) |
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.
Back to perl.module-authors | Previous | Next — Previous in thread | Next in thread | Find similar
Module heirarchy naming for SPI/I²C device drivers leonerd@leonerd.org.uk ("Paul \"LeoNerd\" Evans") - 2015-10-21 18:54 +0100
Re: Module heirarchy naming for SPI/I²C device drivers mca@sanger.ac.uk (Matthew Astley) - 2015-10-22 11:39 +0100
Re: Module heirarchy naming for SPI/I²C device drivers leonerd@leonerd.org.uk ("Paul \"LeoNerd\" Evans") - 2015-10-22 12:42 +0100
Re: Module heirarchy naming for SPI/I²C device drivers leonerd@leonerd.org.uk ("Paul \"LeoNerd\" Evans") - 2015-10-22 18:15 +0100
Re: Module heirarchy naming for SPI/I²C device drivers aaron@priven.com (Aaron Priven) - 2015-10-22 12:52 -0700
Re: Module heirarchy naming for SPI/I²C device drivers dpchrist@holgerdanske.com (David Christensen) - 2015-10-22 18:20 -0700
csiph-web