search for: set_powercom_lin

Displaying 1 result from an estimated 1 matches for "set_powercom_lin".

Did you mean: set_powercom_lines
2006 Jan 27
0
[PATCH] fentonups patch to make it work with some powercom ups's
...nc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <sys/ioctl.h> +#include <sys/types.h> +#include <sys/termios.h> #include "main.h" #include "serial.h" @@ -176,11 +179,27 @@ static char *get_id(void) return NULL; } +static void set_powercom_lines (void) +{ +// straced from powercom's upsmon +//ioctl(4, TIOCMSET, [TIOCM_DTR|0x4000]) = 0 + + int dtr_bit = TIOCM_DTR|0x4000; + ioctl(upsfd, TIOCMSET, &dtr_bit); +} + void upsdrv_initinfo(void) { int modelnum, i, ret; char temp[256], model[32], *raw; + if (testvar("powercom...