Lines Matching +full:4 +full:c
3 * w1_ds2423.c
5 * Copyright (c) 2010 Mika Laitio <lamikr@pilppa.org>
7 * This driver will read and write the value of 4 counters to w1_slave file in
27 #define COUNTER_COUNT 4
40 ssize_t c; in w1_slave_show() local
45 c = PAGE_SIZE; in w1_slave_show()
54 for (p = 0; p < 4; p++) { in w1_slave_show()
57 * 4 bytes for counter in w1_slave_show()
58 * 4 bytes for zero bits in w1_slave_show()
65 c -= snprintf(out_buf + PAGE_SIZE - c, in w1_slave_show()
66 c, "%02x ", in w1_slave_show()
74 c -= snprintf(out_buf + PAGE_SIZE - c, in w1_slave_show()
75 c, "crc=NO\n"); in w1_slave_show()
92 for (ii = 4; ii > 0; ii--) { in w1_slave_show()
97 c -= snprintf(out_buf + PAGE_SIZE - c, in w1_slave_show()
98 c, "crc=YES c=%d\n", result); in w1_slave_show()
100 c -= snprintf(out_buf + PAGE_SIZE - c, in w1_slave_show()
101 c, "crc=NO\n"); in w1_slave_show()
106 c -= snprintf(out_buf + PAGE_SIZE - c, c, "Connection error"); in w1_slave_show()
109 return PAGE_SIZE - c; in w1_slave_show()
131 MODULE_DESCRIPTION("w1 family 1d driver for DS2423, 4 counters and 4kb ram");