On Thu, 22 Oct 2015 13:45:18 +0200 Aldo Calpini <d...@perl.it> wrote:
> I would personally keep Device, most of the hardware-related stuff on > CPAN (not much, but still) is already in that namespace. Agree. > Bus, by itself, is far from unambiguous to me > (https://en.wikipedia.org/wiki/Bus). On the other hand, I think I2C > and SPI are familiar enough to people working - or playing - with > electronics. Ditto. > So I would go for: > > Device::I2C > Device::SPI > > Which are hardware-abstract, and subclassed if/when needed > (Device::I2C::FT232H, etc.). Hmm. I'm not sure I like putting "SPI" or "I²C" or whatever (UART? 1Wire?) in the module name. There are genuinely some chips that are available with a variety of interface types, or some even support a selection of them by different hardware configurations or whatever. So I think that the interface type should be an implementation detail, and not really part of the name. What do you think to simply Device::Chip::* as the namespace for individual chips. E.g Device::Chip::INA219 Device::Chip::MAX7221 I'm not sure if driver adapters (Bus Pirate, FT232H, Raspberry Pi GPIO, etc...) would necessarily warrant a dedicated space too; they become the consumers of these chips, much like my existing Device::BusPirate currently consumes chips within its space. -- Paul "LeoNerd" Evans leon...@leonerd.org.uk http://www.leonerd.org.uk/ | https://metacpan.org/author/PEVANS
pgpoGjIpZZYyr.pgp
Description: OpenPGP digital signature