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