moved PSC3 interrupt handler to C code

This commit is contained in:
Markus Fröschle
2014-02-01 23:37:30 +00:00
parent e0b41f09d6
commit 5e816bf649
2 changed files with 31 additions and 61 deletions

View File

@@ -212,3 +212,25 @@ bool isr_execute_handler(int vector)
return retval;
}
void pic_interrupt_handler(void)
{
uint8_t rcv_byte;
rcv_byte = MCF_PSC3_PSCRB_8BIT;
if (rcv_byte == 2) // PIC requests RTC data
{
uint8_t *rtc_reg= (uint8_t *) 0xffff8961;
uint8_t *rtc_data = (uint8_t *) 0xffff8963;
int index = 0;
xprintf("PIC interrupt requesting RTC data\r\n");
MCF_PSC3_PSCTB_8BIT = 0x82; // header byte to PIC
do
{
*rtc_reg = 0;
MCF_PSC3_PSCTB_8BIT = *rtc_data;
} while (index++ < 64);
}
}