comparison ds1307.c @ 6:3da232f97e81

Invert the bit mask, we only want to turn off this bit, not everything.
author darius@inchoate.localdomain
date Mon, 20 Apr 2009 13:52:06 +0800
parents 15d89caaf516
children 119688bb743f
comparison
equal deleted inserted replaced
5:03eba20b5edb 6:3da232f97e81
45 * 45 *
46 */ 46 */
47 int 47 int
48 ds1307_init(void) { 48 ds1307_init(void) {
49 #ifdef PRR 49 #ifdef PRR
50 PRR &= _BV(PRTWI); /* Power TWI on - note that the 50 PRR &= ~_BV(PRTWI); /* Power TWI on - note that the
51 * datasheet says this is already 0 at 51 * datasheet says this is already 0 at
52 * power on.. */ 52 * power on.. */
53 #endif 53 #endif
54 TWSR = 0; /* TWI Prescaler = 1 */ 54 TWSR = 0; /* TWI Prescaler = 1 */
55 #if F_CPU < 3600000UL 55 #if F_CPU < 3600000UL