diff options
| author | Marti Bolivar <mbolivar@leaflabs.com> | 2012-06-02 21:55:10 -0400 |
|---|---|---|
| committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-06-03 00:03:11 -0400 |
| commit | cdac4113569279a3a59174ff9536690c0fa4ecf2 (patch) | |
| tree | 1bba49a065aaa252688c1d07704b07d4286580b3 /wirish/wirish_shift.cpp | |
| parent | 979483ba79c2e52c003ab7dfde6c57e0b7f1df33 (diff) | |
HardwareTimer.cpp: save some space with an rcc_clk_id hack.
Since rcc_clk_ids for a peripheral now form a contiguous range by
peripheral number, we can infer the rcc_clk_id for a timer given its
number (e.g., can calculate RCC_TIMER2 given timerNum == 2). This lets
us use timer_foreach() to avoid keeping a table of available timers in
HardwareTimer.cpp.
The implementation is hackish, but can be fixed up later if need be.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'wirish/wirish_shift.cpp')
0 files changed, 0 insertions, 0 deletions
