From aa804cf4ef8ed3236ae0065952d1faef735b3824 Mon Sep 17 00:00:00 2001 From: henryk Date: Fri, 23 Nov 2007 17:32:14 +0000 Subject: Add a work around to have each pio data change fiq followed by a regular IRQ in order to enable some code to be run synchronized with critical sections git-svn-id: https://svn.openpcd.org:2342/trunk@348 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/application/tc_cdiv_sync.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'openpicc/application/tc_cdiv_sync.c') diff --git a/openpicc/application/tc_cdiv_sync.c b/openpicc/application/tc_cdiv_sync.c index 0486f90..3405ca2 100644 --- a/openpicc/application/tc_cdiv_sync.c +++ b/openpicc/application/tc_cdiv_sync.c @@ -20,7 +20,8 @@ static void pio_data_change(u_int32_t pio) * edge */ if (*AT91C_PIOA_PDSR & OPENPICC_PIO_FRAME) { vLedSetGreen(1); - *AT91C_TC0_CCR = AT91C_TC_SWTRG; + /* This code is now replaced by hard-coded assembler code in os/boot/boot.s my_fiq_handler */ + /* *AT91C_TC0_CCR = AT91C_TC_SWTRG;*/ DEBUGPCR("CDIV_SYNC_FLIP SWTRG CV=0x%08x", *AT91C_TC0_CV); vLedSetGreen(0); @@ -72,7 +73,9 @@ void tc_cdiv_sync_init(void) AT91F_PIOA_CfgPMC(); AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, OPENPICC_PIO_SSC_DATA_CONTROL); - pio_irq_register(OPENPICC_PIO_FRAME, &pio_data_change); + /* This code is now replaced by hard-coded assembler code in os/boot/boot.s my_fiq_handler */ + /*pio_irq_register(OPENPICC_PIO_FRAME, &pio_data_change);*/ + (void)pio_data_change; //vLedSetGreen(0); tc_cdiv_sync_disable(); -- cgit v1.2.3