5
Last change
on this file since 762fa62 was
7632906,
checked in by Sebastian Huber <sebastian.huber@…>, on 04/19/18 at 04:35:52
|
bsps: Move clock drivers to bsps
This patch is a part of the BSP source reorganization.
Update #3285.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * Clock Tick interrupt conexion code. |
---|
3 | */ |
---|
4 | |
---|
5 | /* |
---|
6 | * COPYRIGHT (c) 1989-1997. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may in |
---|
10 | * the file LICENSE in this distribution or at |
---|
11 | * http://www.rtems.org/license/LICENSE. |
---|
12 | * |
---|
13 | * Modified to support the MPC750. |
---|
14 | * Modifications Copyright (c) 1999 Eric Valette valette@crf.canon.fr |
---|
15 | */ |
---|
16 | |
---|
17 | #include <bsp.h> |
---|
18 | #include <bsp/irq-generic.h> |
---|
19 | #include <rtems/bspIo.h> |
---|
20 | |
---|
21 | extern void clockOn(void*); |
---|
22 | extern void clockOff (void*); |
---|
23 | extern int clockIsOn(void*); |
---|
24 | extern void Clock_isr(void*); |
---|
25 | |
---|
26 | static void BSP_clock_hdl(void * arg) |
---|
27 | { |
---|
28 | Clock_isr(arg); |
---|
29 | } |
---|
30 | |
---|
31 | int BSP_disconnect_clock_handler (void) |
---|
32 | { |
---|
33 | rtems_status_code sc; |
---|
34 | |
---|
35 | clockOff(NULL); |
---|
36 | /* |
---|
37 | * remove interrupt handler |
---|
38 | */ |
---|
39 | sc = rtems_interrupt_handler_remove(BSP_PERIODIC_TIMER, |
---|
40 | BSP_clock_hdl,NULL); |
---|
41 | |
---|
42 | return sc == RTEMS_SUCCESSFUL; |
---|
43 | } |
---|
44 | |
---|
45 | int BSP_connect_clock_handler (rtems_irq_hdl hdl) |
---|
46 | { |
---|
47 | rtems_status_code sc; |
---|
48 | /* |
---|
49 | * install interrupt handler |
---|
50 | */ |
---|
51 | sc = rtems_interrupt_handler_install(BSP_PERIODIC_TIMER, |
---|
52 | "PIT clock",0, |
---|
53 | BSP_clock_hdl,NULL); |
---|
54 | if (sc == RTEMS_SUCCESSFUL) { |
---|
55 | clockOn(NULL); |
---|
56 | } |
---|
57 | return sc == RTEMS_SUCCESSFUL; |
---|
58 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.