Add cal_isr() support

This commit is contained in:
maralvira 2010-11-07 14:21:59 +00:00
parent ab84453401
commit 745e7b5ac2
2 changed files with 10 additions and 2 deletions

View File

@ -30,7 +30,7 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org * This file is part of libmc1322x: see http://mc1322x.devl.org
* for details. * for details.
* *
* $Id: isr.h,v 1.1 2010/06/10 14:55:39 maralvira Exp $ * $Id: isr.h,v 1.2 2010/11/07 14:21:59 maralvira Exp $
*/ */
#ifndef ISR_H #ifndef ISR_H
@ -87,6 +87,8 @@ extern void kbi5_isr(void) __attribute__((weak));
extern void kbi6_isr(void) __attribute__((weak)); extern void kbi6_isr(void) __attribute__((weak));
extern void kbi7_isr(void) __attribute__((weak)); extern void kbi7_isr(void) __attribute__((weak));
extern void cal_isr(void) __attribute__((weak));
extern void uart1_isr(void) __attribute__((weak)); extern void uart1_isr(void) __attribute__((weak));
extern void maca_isr(void) __attribute__((weak)); extern void maca_isr(void) __attribute__((weak));

View File

@ -30,7 +30,7 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org * This file is part of libmc1322x: see http://mc1322x.devl.org
* for details. * for details.
* *
* $Id: isr.c,v 1.1 2010/06/10 14:49:31 maralvira Exp $ * $Id: isr.c,v 1.2 2010/11/07 14:21:59 maralvira Exp $
*/ */
#include <mc1322x.h> #include <mc1322x.h>
@ -66,6 +66,12 @@ void irq(void)
if(kbi_evnt(5) && (kbi5_isr != 0)) { kbi5_isr(); } if(kbi_evnt(5) && (kbi5_isr != 0)) { kbi5_isr(); }
if(kbi_evnt(6) && (kbi6_isr != 0)) { kbi6_isr(); } if(kbi_evnt(6) && (kbi6_isr != 0)) { kbi6_isr(); }
if(kbi_evnt(7) && (kbi7_isr != 0)) { kbi7_isr(); } if(kbi_evnt(7) && (kbi7_isr != 0)) { kbi7_isr(); }
if (CRM.STATUSbits.CAL_DONE && CRM.CAL_CNTLbits.CAL_IEN && cal_isr)
{
CRM.STATUSbits.CAL_DONE = 0;
cal_isr();
}
} }
*INTFRC = 0; /* stop forcing interrupts */ *INTFRC = 0; /* stop forcing interrupts */