comparison ds1307.c @ 65:1ef17cd8af7a

Tab to space conversion in usage text.
author darius@Inchoate
date Sun, 18 Jan 2009 20:03:24 +1030
parents 0910ab6f0095
children
comparison
equal deleted inserted replaced
64:11c453539d31 65:1ef17cd8af7a
223 #endif 223 #endif
224 switch ((twst = TW_STATUS)) { 224 switch ((twst = TW_STATUS)) {
225 case TW_MR_DATA_NACK: 225 case TW_MR_DATA_NACK:
226 /* Send STOP */ 226 /* Send STOP */
227 TWCR = _BV(TWINT) | _BV(TWSTO) | _BV(TWEN); 227 TWCR = _BV(TWINT) | _BV(TWSTO) | _BV(TWEN);
228 //printf_P(PSTR("NACK on byte %d\r\n"), cnt);
228 return cnt; 229 return cnt;
229 230
230 case TW_MR_DATA_ACK: 231 case TW_MR_DATA_ACK:
231 *data++ = TWDR; 232 *data++ = TWDR;
233 //printf_P(PSTR("ACK on byte %d for 0x%02x\r\n"), cnt, *(data - 1));
232 cnt++; 234 cnt++;
233 break; 235 break;
234 236
235 default: 237 default:
236 return IIC_UNKNOWN; 238 return IIC_UNKNOWN;
477 if (rtime.split.pmam) 479 if (rtime.split.pmam)
478 hour += 12; 480 hour += 12;
479 } else 481 } else
480 hour += (rtime.split.pmam << 1) * 10; 482 hour += (rtime.split.pmam << 1) * 10;
481 483
482 printf_P(PSTR("%S%04d/%02d/%d %02d:%02d:%02d%S"), leader, 484 printf_P(PSTR("%S%04d/%02d/%02d %02d:%02d:%02d%S"), leader,
483 1900 + rtime.split.year10 * 10 + rtime.split.year, 485 1900 + rtime.split.year10 * 10 + rtime.split.year,
484 rtime.split.month10 * 10 + rtime.split.month, 486 rtime.split.month10 * 10 + rtime.split.month,
485 rtime.split.day10 * 10 + rtime.split.day, 487 rtime.split.day10 * 10 + rtime.split.day,
486 hour, 488 hour,
487 rtime.split.min10 * 10 + rtime.split.min, 489 rtime.split.min10 * 10 + rtime.split.min,