]> rtime.felk.cvut.cz Git - arc.git/blob - boards/hcs12x_elmicro_tboard/config/Gpt_Cfg.h
f1e59ff5704bc6b4aff632cca33dc04e1784ec45
[arc.git] / boards / hcs12x_elmicro_tboard / config / Gpt_Cfg.h
1 /* -------------------------------- Arctic Core ------------------------------\r
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
3  *\r
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
5  *\r
6  * This source code is free software; you can redistribute it and/or modify it\r
7  * under the terms of the GNU General Public License version 2 as published by the\r
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
9  *\r
10  * This program is distributed in the hope that it will be useful, but\r
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
13  * for more details.\r
14  * -------------------------------- Arctic Core ------------------------------*/\r
15 \r
16 /** @addtogroup Gpt GPT Driver\r
17  *  @{ */\r
18 \r
19 /** @file Gpt_Cfg.h\r
20  *  Definitions of configuration parameters for GPT Driver.\r
21  */\r
22 \r
23 #ifndef GPT_CFG_H_\r
24 #define GPT_CFG_H_\r
25 \r
26 #warning "This default file may only be used as an example!"\r
27 \r
28 #include "Std_Types.h"\r
29 \r
30 \r
31 /** Configuration is pre-compile only. Not supported. */\r
32 #define GPT_VARIANT_PC  STD_OFF\r
33 /** Configuration is a mix of pre-compile and post-build */\r
34 #define GPT_VARIANT_PB  STD_ON\r
35 \r
36 //#define DEC_TEST\r
37 //#define GPT_TEST\r
38 \r
39 /** HW channels */\r
40 #define GPT_CHANNEL_0   0\r
41 #define GPT_CHANNEL_1   1\r
42 #define GPT_CHANNEL_2   2\r
43 #define GPT_CHANNEL_3   3\r
44 #define GPT_CHANNEL_4   4\r
45 #define GPT_CHANNEL_5   5\r
46 #define GPT_CHANNEL_6   6\r
47 #define GPT_CHANNEL_7   7\r
48 #define GPT_CHANNEL_8   8\r
49 \r
50 #define GPT_CHANNEL_CNT 9\r
51 \r
52 // Illegal channel\r
53 #define GPT_CHANNEL_ILL 31\r
54 \r
55 /** Enable Development Error Trace */\r
56 #define GPT_DEV_ERROR_DETECT            STD_ON\r
57 /** Enables/Disables wakeup source reporting. Not supported. */\r
58 #define GPT_REPORT_WAKEUP_SOURCE        STD_OFF\r
59 /** Build DeInit API */\r
60 #define GPT_DEINIT_API                                                  STD_ON\r
61 /** Build notification API */\r
62 #define GPT_ENABLE_DISABLE_NOTIFICATION_API     STD_ON\r
63 /** Build time remaining API */\r
64 #define GPT_TIME_REMAINING_API                                  STD_ON\r
65 /** Build time elapsed API */\r
66 #define GPT_TIME_ELAPSED_API                    STD_ON\r
67 /** Build version info API */\r
68 #define GPT_VERSION_INFO_API                                    STD_ON\r
69 /** Build wakeup API. Not supported */\r
70 #define GPT_WAKEUP_FUNCTIONALITY_API                    STD_OFF\r
71 \r
72 \r
73 /** This container contains the channel-wide configuration (parameters) of the\r
74  *  GPT Driver */\r
75 typedef struct  {\r
76         /** GPT187: The GPT module specific clock input for the timer unit can\r
77          *  statically be configured and allows  to select different clock sources\r
78          *  (external clock, internal GPT specific clock) per channel */\r
79         uint32 GptChannelClkSrc;\r
80 \r
81         /** Channel Id of the GPT channel. */\r
82         Gpt_ChannelType GptChannelId;\r
83 \r
84         /** Specifies the behaviour of the timer channel after the timeout has expired. */\r
85         Gpt_ChannelMode GptChannelMode;\r
86 \r
87         /** Function pointer to callback function */\r
88         void (*GptNotification)();\r
89 \r
90         /** GPT module specific prescaler factor per channel\r
91          *  Not available on HCS12\r
92          */\r
93         //uint32 GptChannelPrescale;\r
94 \r
95         /** GPT188: Enables wakeup capability of CPU for a channel when timeout\r
96          *  period expires. This might be different to enabling the notification\r
97          *  depending on hardware capabilities. Not supported. */\r
98         boolean GptEnableWakeup;\r
99 } Gpt_ConfigType;\r
100 \r
101 /** The list of channel configurations */\r
102 extern const Gpt_ConfigType GptConfigData[];\r
103 \r
104 #endif /*GPT_CFG_H_*/\r
105 /** @} */\r