Commit e7170e9
Fix bug in baudrate compensation. (#44)
* Fix bug in baudrate compensation. The code is now in accordance to the
data sheet. The previous code would in effect either apply twice the
compensation, or apply no compensation, depending on the polarity of
the compensation.
* Improve readability of expression for baudrate compensation.
It is now exactly the same as in the documentation.
The net result is the same as the previous version.
* Since we have code to correct for errors in F_CPU to generate
the right baudrate, then we should use F_CPU, the specified CPU
frequency as basis, not the F_CPU with whatever corrections.1 parent dee1cc2 commit e7170e9
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
| 165 | + | |
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
| |||
0 commit comments