1 /** ###################################################################
\r
2 ** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
\r
3 ** Filename : ButtonInterrupt.C
\r
4 ** Project : RTOSDemo
\r
5 ** Processor : MC9S12C32CFU
\r
7 ** Version : Bean 02.025, Driver 01.06, CPU db: 2.87.276
\r
8 ** Compiler : Metrowerks HC12 C Compiler
\r
9 ** Date/Time : 19/05/2005, 19:02
\r
11 ** This bean "ExtInt" implements an external
\r
12 ** interrupt, its control methods and interrupt/event
\r
13 ** handling procedure.
\r
14 ** The bean uses one pin which generates interrupt on
\r
17 ** Interrupt name : INT_PortP
\r
18 ** User handling procedure : ButtonInterrupt_OnInterrupt
\r
21 ** ----------------------------------------------------
\r
22 ** Number (on package) | Name
\r
23 ** ----------------------------------------------------
\r
24 ** 4 | PP0_PWM0_KWP0
\r
25 ** ----------------------------------------------------
\r
29 ** Bit number (in port) : 0
\r
30 ** Bit mask of the port : 1
\r
32 ** Signal edge/level : falling
\r
35 ** Initial state : Disabled
\r
37 ** Edge register : PPSP [605]
\r
38 ** Priority register : HPRIO [31]
\r
39 ** Enable register : PIEP [606]
\r
40 ** Request register : PIFP [607]
\r
42 ** Port data register : PTP [600]
\r
43 ** Port control register : DDRP [602]
\r
45 ** Enable - void ButtonInterrupt_Enable(void);
\r
47 ** (c) Copyright UNIS, spol. s r.o. 1997-2002
\r
48 ** UNIS, spol. s r.o.
\r
52 ** http : www.processorexpert.com
\r
53 ** mail : info@processorexpert.com
\r
54 ** ###################################################################*/
\r
57 /* MODULE ButtonInterrupt. */
\r
59 #include "ButtonInterrupt.h"
\r
60 /*Including shared modules, which are used for all project*/
\r
61 #include "PE_Types.h"
\r
62 #include "PE_Error.h"
\r
63 #include "PE_Const.h"
\r
65 #include "PE_Timer.h"
\r
69 /* Definition of DATA and CODE segments for this bean. User can specify where
\r
70 these segments will be located on "Build options" tab of the selected CPU bean. */
\r
71 #pragma DATA_SEG ButtonInterrupt_DATA /* Data section for this module. */
\r
72 #pragma CODE_SEG ButtonInterrupt_CODE /* Code section for this module. */
\r
75 ** ===================================================================
\r
76 ** Method : ButtonInterrupt_Enable (bean ExtInt)
\r
79 ** Enable the bean - the external events are accepted.
\r
80 ** Parameters : None
\r
81 ** Returns : Nothing
\r
82 ** ===================================================================
\r
84 void ButtonInterrupt_Enable(void)
\r
86 PIFP = 1; /* Clear flag */
\r
87 PIEP_PIEP0 = 1; /* Enable interrupt */
\r
91 ** ===================================================================
\r
92 ** Method : ButtonInterrupt_Interrupt (bean ExtInt)
\r
95 ** This method is internal. It is used by Processor Expert
\r
97 ** ===================================================================
\r
99 #pragma CODE_SEG __NEAR_SEG NON_BANKED /* Interrupt section for this module. Placement will be in NON_BANKED area. */
\r
100 __interrupt void ButtonInterrupt_Interrupt(void)
\r
102 PIFP = 1; /* Clear flag */
\r
103 ButtonInterrupt_OnInterrupt();
\r
106 #pragma CODE_SEG ButtonInterrupt_CODE /* Code section for this module. */
\r
108 /* END ButtonInterrupt. */
\r
111 ** ###################################################################
\r
113 ** This file was created by UNIS Processor Expert 03.33 for
\r
114 ** the Motorola HCS12 series of microcontrollers.
\r
116 ** ###################################################################
\r