summaryrefslogtreecommitdiff
path: root/openpicc/application/tc_cdiv.c
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-12-21 00:24:39 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-12-21 00:24:39 +0000
commitf06c7a7ffa7ca7bcd0c86238e9f94a9f4cf8333f (patch)
tree72fa0e7141eea6a2aebfa9d5c1c39324952960e0 /openpicc/application/tc_cdiv.c
parent021f73634e525901dd38b206dac35b747c8dd8d2 (diff)
Use finer grained #ifdef's for the new board's features
git-svn-id: https://svn.openpcd.org:2342/trunk@400 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/tc_cdiv.c')
-rw-r--r--openpicc/application/tc_cdiv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/openpicc/application/tc_cdiv.c b/openpicc/application/tc_cdiv.c
index eb8484c..226abbe 100644
--- a/openpicc/application/tc_cdiv.c
+++ b/openpicc/application/tc_cdiv.c
@@ -45,7 +45,7 @@ void __ramfunc tc_cdiv_set_divider(u_int16_t div)
* zero modulo the new RC.*/
/*tc_cdiv_phase_add(tcb->TCB_TC0.TC_RC-(tcb->TCB_TC0.TC_CV%tcb->TCB_TC0.TC_RC));*/
if(tcb->TCB_TC0.TC_CV > div
-#ifdef OPENPICC_MODIFIED_BOARD
+#ifdef OPENPICC_USE_CLOCK_GATING
/* Don't spin if FRAME_BURST is clear, the clock is stopped in this case */
&& !(!AT91F_PIO_IsInputSet(AT91C_BASE_PIOA, OPENPICC_PIO_FRAME_BURST))
#endif
@@ -81,7 +81,7 @@ void tc_cdiv_init(void)
OPENPICC_PIO_CARRIER_DIV_OUT |
OPENPICC_PIO_CDIV_HELP_OUT |
OPENPICC_PIO_CDIV_HELP_IN
-#ifdef OPENPICC_MODIFIED_BOARD
+#ifdef OPENPICC_USE_CLOCK_GATING
| OPENPICC_PIO_FRAME_BURST
#endif
);
@@ -95,7 +95,7 @@ void tc_cdiv_init(void)
/* Connect TCLK1 to XC1, TCLK2 to XC2 */
tcb->TCB_BMR &= ~(AT91C_TCB_TC1XC1S | AT91C_TCB_TC2XC2S);
tcb->TCB_BMR |= (AT91C_TCB_TC1XC1S_TCLK1 | AT91C_TCB_TC2XC2S_TCLK2);
-#ifdef OPENPICC_MODIFIED_BOARD
+#ifdef OPENPICC_USE_CLOCK_GATING
/* Connect TCLK0 to XC0 */
tcb->TCB_BMR &= ~(AT91C_TCB_TC0XC0S);
tcb->TCB_BMR |= (AT91C_TCB_TC0XC0S_TCLK0);
@@ -112,7 +112,7 @@ void tc_cdiv_init(void)
AT91C_TC_BEEVT_SET | AT91C_TC_BCPB_CLEAR |
AT91C_TC_EEVT_XC2 | AT91C_TC_ETRGEDG_RISING |
AT91C_TC_BSWTRG_CLEAR | AT91C_TC_ASWTRG_CLEAR
-#ifdef OPENPICC_MODIFIED_BOARD
+#ifdef OPENPICC_USE_CLOCK_GATING
| AT91C_TC_BURST_XC0
#endif
;
personal git repositories of Harald Welte. Your mileage may vary