aboutsummaryrefslogtreecommitdiffstats
path: root/examples/test-serial-flush.cpp
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-02 21:55:10 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-03 00:03:11 -0400
commit98cc4bfcace01da7b467280f586bb6844916dea7 (patch)
tree1bba49a065aaa252688c1d07704b07d4286580b3 /examples/test-serial-flush.cpp
parent7943836c4a967e70ced14a2f4accf21a0469b238 (diff)
downloadlibrambutan-98cc4bfcace01da7b467280f586bb6844916dea7.tar.gz
librambutan-98cc4bfcace01da7b467280f586bb6844916dea7.zip
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 'examples/test-serial-flush.cpp')
0 files changed, 0 insertions, 0 deletions