search for: sec_recv

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

Did you mean: i2c_recv
2005 Dec 19
0
new(er) SEC driver.
...#define sec_edi(i) (_sec_meta[(i)%SEC_NUMVARS].edi) #define sec_value(i) (_sec_meta[(i)%SEC_NUMVARS].value) struct _sec_meta { int supported; int edi; /* enumeratated data index */ char value[SEC_MAX_VARSIZE]; }; static struct _sec_meta _sec_meta[SEC_NUMVARS] = { { 0, 0 } }; /* * sec_recv(fd, buf, len) * * Read a SEC format message (^<cmdchar><len><data>) from the UPS * and store in <data> in buf. * * Return -2 if failed to read valid response * Return -1 if command failed (^0) * Return 0 if command succeeded (^1) * Return len if data returned * */...