aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-03-24 07:56:29 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-03-24 08:01:13 -0400
commitbc246609ccd44601a0564fea8da407cc500ad471 (patch)
tree37dfa88dfc74f1fa18206c8587da6cfc4d39795d
parent61db54f52f32e63c895d775982fbcdcb67f2dde6 (diff)
downloadlibrambutan-bc246609ccd44601a0564fea8da407cc500ad471.tar.gz
librambutan-bc246609ccd44601a0564fea8da407cc500ad471.zip
timer_set_dma_burst_length() and TIMER8 comment bugfixes
-rw-r--r--libmaple/timer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmaple/timer.h b/libmaple/timer.h
index 025bcb0..fa19cc9 100644
--- a/libmaple/timer.h
+++ b/libmaple/timer.h
@@ -170,7 +170,7 @@ extern timer_dev *TIMER5;
extern timer_dev *TIMER6;
/** Timer 7 device (basic) */
extern timer_dev *TIMER7;
-/** Timer 8 device (basic) */
+/** Timer 8 device (advanced) */
extern timer_dev *TIMER8;
#endif
@@ -855,7 +855,7 @@ static inline uint8 timer_get_dma_burst_length(timer_dev *dev) {
static inline void timer_set_dma_burst_length(timer_dev *dev, uint8 length) {
uint32 tmp = (dev->regs).gen->DCR;
tmp &= ~TIMER_DCR_DBL;
- tmp |= (length << 8) - 1;
+ tmp |= (length - 1) << 8;
(dev->regs).gen->DCR = tmp;
}