summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2018-04-24 11:38:19 +0200
committerjaseg <git@jaseg.net>2018-04-24 11:38:19 +0200
commita5f7fd8d2946fa6830deff1e6784e8b2be7cbb1c (patch)
tree9bb76b49181969bbb066b8c5dcc83d8ea11d9854
parentbf393709e3ebcc4ebe36e24f4bfb27caea992226 (diff)
downloadolsndot-a5f7fd8d2946fa6830deff1e6784e8b2be7cbb1c.tar.gz
olsndot-a5f7fd8d2946fa6830deff1e6784e8b2be7cbb1c.tar.bz2
olsndot-a5f7fd8d2946fa6830deff1e6784e8b2be7cbb1c.zip
Small firmware code prettification
-rw-r--r--firmware/main.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/firmware/main.c b/firmware/main.c
index bffe0c0..81ae15f 100644
--- a/firmware/main.c
+++ b/firmware/main.c
@@ -66,9 +66,6 @@ uint32_t sys_time_seconds = 0;
#define A TIMER_CYCLES_FOR_SPI_TRANSMISSIONS
#define B 40
-/* This is a constant offset containing some empirically determined correction values */
-#define C 0
-
/* This lookup table maps bit positions to timer period values. This is a lookup table to allow for the compensation for
* non-linear effects of ringing at lower bit durations.
*/
@@ -79,15 +76,15 @@ static uint16_t timer_period_lookup[NBITS] = {
A + 9,
A + 29,
A + 71,
- A - C + (B<< 2),
- A - C + (B<< 3),
- A - C + (B<< 4),
- A - C + (B<< 5),
- A - C + (B<< 6),
- A - C + (B<< 7),
- A - C + (B<< 8),
- A - C + (B<< 9),
- A - C + (B<<10),
+ A + (B<< 2),
+ A + (B<< 3),
+ A + (B<< 4),
+ A + (B<< 5),
+ A + (B<< 6),
+ A + (B<< 7),
+ A + (B<< 8),
+ A + (B<< 9),
+ A + (B<<10),
/* MSB here */
};