]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/HCS12_CodeWarrior_small/CODE/ButtonInterrupt.C
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / HCS12_CodeWarrior_small / CODE / ButtonInterrupt.C
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
6 **     Beantype  : ExtInt\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
10 **     Abstract  :\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
15 **         selected edge.\r
16 **     Settings  :\r
17 **         Interrupt name              : INT_PortP\r
18 **         User handling procedure     : ButtonInterrupt_OnInterrupt\r
19 **\r
20 **         Used pin                    : \r
21 **             ----------------------------------------------------\r
22 **                Number (on package)  |    Name\r
23 **             ----------------------------------------------------\r
24 **                       4             |  PP0_PWM0_KWP0\r
25 **             ----------------------------------------------------\r
26 **\r
27 **         Port name                   : P\r
28 **\r
29 **         Bit number (in port)        : 0\r
30 **         Bit mask of the port        : 1\r
31 **\r
32 **         Signal edge/level           : falling\r
33 **         Priority                    : 1\r
34 **         Pull option                 : up\r
35 **         Initial state               : Disabled\r
36 **\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
41 **\r
42 **         Port data register          : PTP       [600]\r
43 **         Port control register       : DDRP      [602]\r
44 **     Contents  :\r
45 **         Enable - void ButtonInterrupt_Enable(void);\r
46 **\r
47 **     (c) Copyright UNIS, spol. s r.o. 1997-2002\r
48 **     UNIS, spol. s r.o.\r
49 **     Jundrovska 33\r
50 **     624 00 Brno\r
51 **     Czech Republic\r
52 **     http      : www.processorexpert.com\r
53 **     mail      : info@processorexpert.com\r
54 ** ###################################################################*/\r
55 \r
56 \r
57 /* MODULE ButtonInterrupt. */\r
58 \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
64 #include "IO_Map.h"\r
65 #include "PE_Timer.h"\r
66 #include "Events.h"\r
67 #include "Cpu.h"\r
68 \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
73 \r
74 /*\r
75 ** ===================================================================\r
76 **     Method      :  ButtonInterrupt_Enable (bean ExtInt)\r
77 **\r
78 **     Description :\r
79 **         Enable the bean - the external events are accepted.\r
80 **     Parameters  : None\r
81 **     Returns     : Nothing\r
82 ** ===================================================================\r
83 */\r
84 void ButtonInterrupt_Enable(void)\r
85 {\r
86   PIFP = 1;                             /* Clear flag */\r
87   PIEP_PIEP0 = 1;                       /* Enable interrupt */\r
88 }\r
89 \r
90 /*\r
91 ** ===================================================================\r
92 **     Method      :  ButtonInterrupt_Interrupt (bean ExtInt)\r
93 **\r
94 **     Description :\r
95 **         This method is internal. It is used by Processor Expert\r
96 **         only.\r
97 ** ===================================================================\r
98 */\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
101 {\r
102   PIFP = 1;                             /* Clear flag */\r
103   ButtonInterrupt_OnInterrupt();\r
104 }\r
105 \r
106 #pragma CODE_SEG ButtonInterrupt_CODE  /* Code section for this module. */\r
107 \r
108 /* END ButtonInterrupt. */\r
109 \r
110 /*\r
111 ** ###################################################################\r
112 **\r
113 **     This file was created by UNIS Processor Expert 03.33 for \r
114 **     the Motorola HCS12 series of microcontrollers.\r
115 **\r
116 ** ###################################################################\r
117 */\r