We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a0f6beb + afb0266 commit a40389dCopy full SHA for a40389d
libraries/Wire/src/utility/twi.c
@@ -201,7 +201,7 @@ void TWI_MasterSetBaud(uint32_t frequency){
201
t_rise = 1000;
202
}
203
204
- uint32_t baud = ((F_CPU_CORRECTED/frequency) - (((F_CPU_CORRECTED*t_rise)/1000)/1000)/1000 - 10)/2;
+ uint32_t baud = (F_CPU_CORRECTED / frequency - F_CPU_CORRECTED / 1000 / 1000 * t_rise / 1000 - 10) / 2;
205
TWI0.MBAUD = (uint8_t)baud;
206
207
0 commit comments