search for: sendcr_and_clear_buf

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

2006 Jul 24
2
fentonups driver patch for Effekta MHD3000 UPS
...ups.c 2006-07-24 16:20:19.000000000 +0200 *************** *** 30,38 **** --- 30,52 ---- #define DRV_VERSION "1.22" static int cap_upstemp = 0; + static int is_online = 0; static float lowvolt = 0, voltrange, chrglow = 0, chrgrange; static int lownorm, highnorm; + static void sendcr_and_clear_buf(void) + { + int ret; + + ret = ser_send(upsfd, "\r"); + + usleep(300000); + + if (ret != 1) + upslog(LOG_ERR, "sendcr_and_clear_buf: ser_send failed"); + ser_flush_in(upsfd, "", 0); + } + /* handle devices which don't give a properly formatted I string...