]> begriffs open source - cmsis-freertos/blob - Demo/HCS12_CodeWarrior_small/CODE/PE_Timer.C
Update cmsis_os2.c
[cmsis-freertos] / Demo / HCS12_CodeWarrior_small / CODE / PE_Timer.C
1 /** ###################################################################
2 **     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
3 **     Filename  : PE_Timer.C
4 **     Project   : RTOSDemo
5 **     Processor : MC9S12C32CFU
6 **     Beantype  : PE_Timer
7 **     Version   : Driver 01.00
8 **     Compiler  : Metrowerks HC12 C Compiler
9 **     Date/Time : 17/05/2005, 08:44
10 **     Abstract  :
11 **         This bean "PE_Timer" implements internal methods and definitions
12 **         used by beans working with timers.
13 **     Settings  :
14 **     Contents  :
15 **         No public methods
16 **
17 **     (c) Copyright UNIS, spol. s r.o. 1997-2002
18 **     UNIS, spol. s r.o.
19 **     Jundrovska 33
20 **     624 00 Brno
21 **     Czech Republic
22 **     http      : www.processorexpert.com
23 **     mail      : info@processorexpert.com
24 ** ###################################################################*/
25
26
27 /* MODULE PE_Timer. */
28
29 #include "PE_Timer.h"
30
31
32 /*
33 ** ===================================================================
34 **     Method      :  PE_Timer_LngHi1 (bean PE_Timer)
35 **
36 **     Description :
37 **         This method is internal. It is used by Processor Expert
38 **         only.
39 ** ===================================================================
40 */
41 bool PE_Timer_LngHi1(dword High, dword Low, word *Out) 
42 {
43   if ((High == 0) && ((Low >> 24) == 0)) 
44     if ((Low & 0x80) != 0) {
45       if ((Low >> 8) < 0xFFFF) {
46         *Out = ((unsigned int)(Low >> 8))+1;
47         return FALSE;
48       }  
49     }   
50     else {
51       *Out = (unsigned int)(Low >> 8);
52       return FALSE;
53     }  
54   *Out = (unsigned int)(Low >> 8);
55   return TRUE;
56 }
57
58
59
60 /* END PE_Timer. */
61
62 /*
63 ** ###################################################################
64 **
65 **     This file was created by UNIS Processor Expert 03.33 for 
66 **     the Motorola HCS12 series of microcontrollers.
67 **
68 ** ###################################################################
69 */