File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
avr/libraries/Wire1/src/utility Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ void twi_init1(void)
83
83
84
84
/* twi bit rate formula from atmega128 manual pg 204
85
85
SCL Frequency = CPU Clock Frequency / (16 + (2 * TWBR))
86
- note: TWBR should be 10 or higher for master mode
86
+ note: TWBR1 should be 10 or higher for master mode
87
87
It is 72 for a 16mhz Wiring board with 100kHz TWI */
88
88
89
89
// enable twi module, acks, and twi interrupt
@@ -126,7 +126,7 @@ void twi_setAddress1(uint8_t address)
126
126
*/
127
127
void twi_setFrequency1 (uint32_t frequency )
128
128
{
129
- TWBR = ((F_CPU / frequency ) - 16 ) / 2 ;
129
+ TWBR1 = ((F_CPU / frequency ) - 16 ) / 2 ;
130
130
131
131
/* twi bit rate formula from atmega128 manual pg 204
132
132
SCL Frequency = CPU Clock Frequency / (16 + (2 * TWBR1))
You can’t perform that action at this time.
0 commit comments