diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-02-11 12:25:41 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-02-11 12:25:41 +0000 |
commit | a72e0c20bb28d382fc7377f270b4d9944baeaf97 (patch) | |
tree | ccef735dde833330c87b44cbc02c9a5a4849174b /openpicc/application/tc_cdiv_sync.c | |
parent | f0c0bc64efe337d28955bf0f0cc05871606e9ea6 (diff) |
Framework to support run-time hardware selection. Future hardware releases should be changed to be boot-time detectable (e.g. using the yet unused AD inputs) so that one image can be used for all
releases
git-svn-id: https://svn.openpcd.org:2342/trunk@411 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/tc_cdiv_sync.c')
-rw-r--r-- | openpicc/application/tc_cdiv_sync.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/openpicc/application/tc_cdiv_sync.c b/openpicc/application/tc_cdiv_sync.c index dbaf3f7..695095d 100644 --- a/openpicc/application/tc_cdiv_sync.c +++ b/openpicc/application/tc_cdiv_sync.c @@ -2,6 +2,7 @@ #include <lib_AT91SAM7.h> #include <AT91SAM7.h> +#include "tc_cdiv_sync.h" #include "dbgu.h" #include "pio_irq.h" #include "openpicc.h" @@ -46,10 +47,11 @@ void tc_cdiv_sync_reset(void) for (i = 0; i < 0xff; i++) ; AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPICC_PIO_SSC_DATA_CONTROL); -#ifdef OPENPICC_USE_CLOCK_GATING - /* reset tc_cdiv counter, the cleared frame signal stopped the tc_cdiv clock */ - tc_cdiv_reset(); -#endif + + if(OPENPICC->features.clock_gating) { + /* reset tc_cdiv counter, the cleared frame signal stopped the tc_cdiv clock */ + tc_cdiv_reset(); + } } } @@ -68,7 +70,7 @@ void tc_cdiv_sync_enable(void) *AT91C_PIOA_IER = OPENPICC_PIO_FRAME; } -void tc_cdiv_sync_init(void) +void tc_cdiv_sync_init() { pio_irq_init_once(); DEBUGPCRF("initializing"); |