aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/HardwareTimer.cpp
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-03-07 13:11:54 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2011-03-11 16:24:44 -0500
commitc8da1c3b7b6eb450138a00af9bbbee607f596837 (patch)
tree207777355d41dc8947d94665ef9a8bae8982805a /wirish/HardwareTimer.cpp
parent5b07707cdaa6268e1a984727bb907a7b10e8ada7 (diff)
downloadlibrambutan-c8da1c3b7b6eb450138a00af9bbbee607f596837.tar.gz
librambutan-c8da1c3b7b6eb450138a00af9bbbee607f596837.zip
[WIP] GPIO refactor: seems ok, ready for review
Diffstat (limited to 'wirish/HardwareTimer.cpp')
-rw-r--r--wirish/HardwareTimer.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/wirish/HardwareTimer.cpp b/wirish/HardwareTimer.cpp
index 0f8bec6..04d1c76 100644
--- a/wirish/HardwareTimer.cpp
+++ b/wirish/HardwareTimer.cpp
@@ -89,7 +89,7 @@ uint16 HardwareTimer::setPeriod(uint32 microseconds) {
return this->getOverflow();
}
-inline void HardwareTimer::setChannelMode(int channel, TimerMode mode) {
+void HardwareTimer::setChannelMode(int channel, TimerMode mode) {
timer_set_mode(this->timerNum, channel, mode);
}
@@ -109,7 +109,7 @@ void HardwareTimer::setChannel4Mode(TimerMode mode) {
this->setChannelMode(4, mode);
}
-inline uint16 HardwareTimer::getCompare(int channel) {
+uint16 HardwareTimer::getCompare(int channel) {
return timer_get_compare_value(this->timerNum, channel);
}
@@ -129,7 +129,7 @@ uint16 HardwareTimer::getCompare4() {
return this->getCompare(4);
}
-inline void HardwareTimer::setCompare(int channel, uint16 val) {
+void HardwareTimer::setCompare(int channel, uint16 val) {
uint16 ovf = this->getOverflow();
timer_set_compare_value(this->timerNum, channel, min(val, ovf));
}
@@ -150,7 +150,7 @@ void HardwareTimer::setCompare4(uint16 val) {
this->setCompare(4, val);
}
-inline void HardwareTimer::attachInterrupt(int channel, voidFuncPtr handler) {
+void HardwareTimer::attachInterrupt(int channel, voidFuncPtr handler) {
timer_attach_interrupt(this->timerNum, channel, handler);
}
@@ -170,7 +170,7 @@ void HardwareTimer::attachCompare4Interrupt(voidFuncPtr handler) {
this->attachInterrupt(4, handler);
}
-inline void HardwareTimer::detachInterrupt(int channel) {
+void HardwareTimer::detachInterrupt(int channel) {
timer_detach_interrupt(this->timerNum, channel);
}
@@ -194,7 +194,6 @@ void HardwareTimer::generateUpdate(void) {
timer_generate_update(this->timerNum);
}
-
HardwareTimer Timer1(TIMER1);
HardwareTimer Timer2(TIMER2);
HardwareTimer Timer3(TIMER3);