Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:58

0001 /*
0002  *  Clock Tick interrupt conexion code.
0003  */
0004 
0005 /*
0006  *  COPYRIGHT (c) 1989-1997.
0007  *  On-Line Applications Research Corporation (OAR).
0008  *
0009  *  The license and distribution terms for this file may in
0010  *  the file LICENSE in this distribution or at
0011  *  http://www.rtems.org/license/LICENSE.
0012  *
0013  *  Modified to support the MPC750.
0014  *  Modifications Copyright (c) 1999 Eric Valette valette@crf.canon.fr
0015  */
0016 
0017 #include <bsp.h>
0018 #include <bsp/irq.h>
0019 #include <libcpu/c_clock.h>
0020 #include <libcpu/cpuIdent.h>
0021 
0022 static rtems_irq_connect_data clockIrqData;
0023 static rtems_irq_connect_data clockIrqData = {
0024   BSP_DECREMENTER,
0025   clockIsr,
0026   NULL,
0027   (rtems_irq_enable)clockOn,
0028   (rtems_irq_disable)clockOff,
0029   (rtems_irq_is_enabled) clockIsOn
0030 };
0031 
0032 int BSP_disconnect_clock_handler(void)
0033 {
0034   return BSP_remove_rtems_irq_handler(&clockIrqData);
0035 }
0036 
0037 int BSP_connect_clock_handler(void)
0038 {
0039   if ( ppc_cpu_is_bookE() )
0040     clockIrqData.hdl = clockIsrBookE;
0041 
0042   return BSP_install_rtems_irq_handler(&clockIrqData);
0043 }