337 } else { |
337 } else { |
338 output = 0xff; |
338 output = 0xff; |
339 } |
339 } |
340 |
340 |
341 if ((write_w1(device->address, (char *)"output", output)) == 0) { |
341 if ((write_w1(device->address, (char *)"output", output)) == 0) { |
342 syslog(LOG_NOTICE, "DS2413 PIO%c value=%d", (device->subdevice == 0) ? 'A' : 'B', (value == 0) ? 0 : 1); |
342 syslog(LOG_NOTICE, "DS2413 PIO%c value=%d (%s)", (device->subdevice == 0) ? 'A' : 'B', (value == 0) ? 0 : 1, device->comment); |
343 if (debug) |
343 if (debug) |
344 fprintf(stdout, "DS2413 PIO%c value=%d\n", (device->subdevice == 0) ? 'A' : 'B', (value == 0) ? 0 : 1); |
344 fprintf(stdout, "DS2413 PIO%c value=%d (%s)\n", (device->subdevice == 0) ? 'A' : 'B', (value == 0) ? 0 : 1, device->comment); |
345 device->value = (value == 0) ? 0 : 1; |
345 device->value = (value == 0) ? 0 : 1; |
346 device->timestamp = time(NULL); |
346 device->timestamp = time(NULL); |
347 } |
347 } |
348 } |
348 } |
349 } |
349 } |