[Nut-upsdev] megatec over USB - using Andrey Lelikov's approach

Carlos Rodrigues carlos.efr at mail.telepac.pt
Sun Dec 31 03:06:46 CET 2006


On 12/30/06, Alexander I. Gordeev <lasaine at lvk.cs.msu.su> wrote:
> Hi All,
>
> finally, I've got time and resources for development. Unfortunately I
> couldn't
> afford playing with my UPS because it was used permanently, but now it's
> ok.
>
> I've checked out cureent trunc and I see that Andrey Lelikov's changes
> haven't
> been applied yet. What's wrong with them?
> I think, he made a great job to simplify future support for this kind of
> UPSes.
> His patch is outdated now but if you don't mind I can try to merge it to
> the
> current code. Or maybe Andrey wants to do it himself?
>
> If you consider this change of the megatec driver harmfull I'll write
> separate
> driver, basing on his code.

The changes aren't harmful, but like Arjen suggested, the best
approach is to make the USB communications layer have the same source
level API as the serial layer. Then, the driver only has to be linked
with either "serial.o" or, say, "usb.o" to create the two different
versions. This has the added benefit of maybe being useful for other
drivers as well.

-- 
Carlos Rodrigues



More information about the Nut-upsdev mailing list