Displaying 3 results from an estimated 3 matches for "ser_send_buf_pace".
2008 Feb 08
0
[nut-commits] svn commit r1285 - in trunk: . common include
...nction 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).
There is not much...
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 passing arg...
2006 Dec 05
3
megatec over USB - new driver patch
...va_start(ap, fmt);
+
+ len = vsnprintf(buf, sizeof(buf), fmt, ap);
+
+ va_end(ap);
+
+ if ((len < 1) || (len >= (int) sizeof(buf)))
+ upslogx(LOG_WARNING, "comm_ser_send: vsnprintf needed more "
+ "than %d bytes", (int)sizeof(buf));
+
+ return ser_send_buf_pace(upsfd, SEND_PACE, (unsigned char*)buf, len);
+}
+
+static int comm_ser_recv(char *buffer,size_t buffer_len,char endchar,const char *ignchars)
+{
+ return ser_get_line(upsfd, buffer, buffer_len, endchar, ignchars, READ_TIMEOUT, 0);
+}
+
+static megatec_comm_t comm_ser =
+{
+ .name = "ser...