search for: max_return_size

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

2010 Jan 06
1
blazer_usb: compatibility with Ippon BackPro UPSes (Phoenix Power Co., Ltd usb-to-serial controller)
...} - ------------------- cut -------------------------------------- 6. Read back return string from UPS in one chunk using usb_interrupt_read: - ------------------- cut -------------------------------------- char tmp[256]; memset(tmp, 0, sizeof(tmp)); int ret = usb_interrupt_read(devfd, 0x81, tmp, max_return_size, timeout); if(ret <= 0) { return_buf[0] = 0; return -1; } int max = (max_return_size > 256) ? 256 : max_return_size; memcpy(return_buf, tmp, max); return_buf[max] = 0; usb_close(devfd); return max; - ------------------- cut -------------------------------------- The differences between the...