[Nut-upsdev] GPIO as NUT driver interface?
MODRIS BĒRZONIS
modrisb at apollo.lv
Tue Feb 21 19:39:21 GMT 2023
Hi!
I have CyberPower CyberShield CSN27U12V UPS. This device don't have
usual for UPS interface, just open collector pins. I connected these
pins to GPIO interface on Orange Pi Zero and wrote NUT driver for this
case. Any interest from NUT community to add this driver to regular
build tree?
See driver code in attachment. Code is fully functional, needs cleanup
to match coding guidelines and needs more tests for rules processing
part. Driver reads GPIO line statuses and transforms them to NUT
statuses using short rules description parameter in the form of status
strings and logical operations on line values.
Modris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adelsystem_cbi.c
Type: text/x-csrc
Size: 39959 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20230221/f6170038/attachment-0002.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpio.c
Type: text/x-csrc
Size: 18929 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20230221/f6170038/attachment-0003.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpio.h
Type: text/x-chdr
Size: 1198 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20230221/f6170038/attachment-0001.h>
More information about the Nut-upsdev
mailing list