Displaying 7 results from an estimated 7 matches for "ser_send_buf".
2011 Oct 03
0
patch: Fix [-Wunused-but-set-variable]
...:22.000000000 +0300
@@ -96,10 +96,9 @@ long int get_long(unsigned char *buffer)
void send_zeros(void) { /* send 100 times the value 0x00.....it seems to be used for resetting */
unsigned char buf[100]; /* the ups serial port */
- int i;
memset(buf, '\0', sizeof(buf));
- i = ser_send_buf(upsfd, buf, sizeof(buf));
+ ser_send_buf(upsfd, buf, sizeof(buf));
return;
}
Index: b/drivers/mge-shut.c
===================================================================
--- a/drivers/mge-shut.c 2011-05-31 13:36:49.000000000 +0300
+++ b/drivers/mge-shut.c 2011-08-17 00:23:22.000000000 +0300...
2005 Nov 08
0
gcc4 noise
..._updateinfo:
powercom.c:233: warning: pointer targets in passing argument 2 of ser_get_buf_len differ in signedness
gcc -I../include -O -Wall -Wsign-compare -c -o cyberpower.o cyberpower.c
cyberpower.c: In function confirm_write:
cyberpower.c:198: warning: pointer targets in passing argument 3 of ser_send_buf_pace differ in signedness
gcc -I../include -O -Wall -Wsign-compare -c -o belkinunv.o belkinunv.c
belkinunv.c: In function belkin_nut_receive:
belkinunv.c:252: warning: pointer targets in passing argument 2 of ser_get_buf_len differ in signedness
belkinunv.c:266: warning: pointer targets in passin...
2008 Feb 08
0
[nut-commits] svn commit r1285 - in trunk: . common include
...debug_hex() function so that it
> no longer requires casting to an unsigned char.
>
> Modified:
> trunk/ChangeLog
> trunk/common/common.c
> trunk/include/common.h
>
> Modified: trunk/ChangeLog
I would like to do something similar to the following ser_* functions:
ser_send_buf
ser_send_buf_pace
ser_get_buf_len
ser_get_line_alert
ser_get_line
Many drivers currently 'suffer' from compiler signedness warnings. We
could do away with these by typecasting everything to the 'correct' type,
but I think this is unwanted (and sometimes even counter productive)...
2011 May 19
2
Scheduling NUT 2.6.1
Fellows,
time has come for a new NUT release: I'm planning on 2.6.1 next week (max
Friday 27), and I'm currently processing remaining patches.
If you have some more on your side, please send in.
cheers,
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer -
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...1-08-17 03:21:04.000000000 +0300
@@ -49,7 +49,7 @@ static void send_command(unsigned char *
if (retry == PW_MAX_TRY) {
ser_send_char(upsfd, 0x1d); /* last retry is preceded by a ESC.*/
- usleep(250000);
+ struct timespec delay = {0, 250e6}; nanosleep(&delay, NULL);
}
sent = ser_send_buf(upsfd, sbuf, command_length);
@@ -255,6 +255,7 @@ void pw_comm_setup(const char *port)
unsigned char id_command = PW_ID_BLOCK_REQ;
unsigned char answer[256];
int i = 0, baud, mybaud = 0, ret = -1;
+ struct timespec delay;
if (getval("baud_rate") != NULL)
{
@@ -273,12 +274,14...
2008 Dec 24
1
Driver removal notification: al175
Hi Kirill,
just to notify you that your al175 driver is being removed from the
NUT tree, as of 2.4.0-pre1.
if you wish to see it entering the tree again, please contact the
Development mailing list to talk about it.
Merry Christmas and happy New Year.
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops
Network UPS Tools (NUT) Project Leader -
2005 Dec 19
0
new(er) SEC driver.
...{
snprintf(msg, SEC_SIZE, "%c%c%03d%s%s", SEC_MSG_STARTCHAR,
mode, len+3, command, buf);
} else {
snprintf(msg, SEC_SIZE, "%c%c003%s", SEC_MSG_STARTCHAR,
mode, command);
}
upsdebugx(SEC_LOG_LOWLEVEL, "PC-->UPS: \"%s\"", msg);
ret = ser_send_buf(fd, msg, strlen(msg));
upsdebugx(SEC_LOG_LOWLEVEL, " send returned: %d",ret);
return ret;
}
/* set up the serial connection */
static int
sec_setup_serial(const char *port)
{
char tmp[SEC_SIZE];
int i, ret, fd;
/* The SEC protocol alows for different baud rates. My...