oc_pal_mapping.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017-2018 NXP
3  * All rights reserved.
4  *
5  * THIS SOFTWARE IS PROVIDED BY NXP "AS IS" AND ANY EXPRESSED OR
6  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
7  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
8  * IN NO EVENT SHALL NXP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
9  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
10  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
11  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
14  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
15  * THE POSSIBILITY OF SUCH DAMAGE.
16  */
17 
23 #ifndef OC_PAL_MAPPING_H
24 #define OC_PAL_MAPPING_H
25 
26 #include "device_registers.h"
27 #include "oc_pal_cfg.h"
28 
29 /* Include peripheral drivers */
30 #if (defined(OC_PAL_OVER_FTM))
31  #include "ftm_oc_driver.h"
32  #include "ftm_mc_driver.h"
33 
34  /* The maximum of channel in each instance */
35  #define OC_PAL_NUM_OF_CHANNEL_MAX FEATURE_FTM_CHANNEL_COUNT
36  /* The number of instances are available */
37  #define NUMBER_OF_OC_PAL_INSTANCES NO_OF_FTM_INSTS_FOR_OC
38  /* The maximum of instances in FTM */
39  #define OC_PAL_INSTANCES_MAX FTM_INSTANCE_COUNT
40 #endif /* defined(OC_PAL_OVER_FTM) */
41 
42 #if (defined(OC_PAL_OVER_EMIOS))
43  #include "emios_mc_driver.h"
44  #include "emios_oc_driver.h"
45 
46  /* The maximum of channel in each instance */
47  #define OC_PAL_NUM_OF_CHANNEL_MAX eMIOS_UC_COUNT
48  /* The number of instances are available */
49  #define NUMBER_OF_OC_PAL_INSTANCES NO_OF_EMIOS_INSTS_FOR_OC
50  /* The maximum of instances in eMIOS */
51  #define OC_PAL_INSTANCES_MAX eMIOS_INSTANCE_COUNT
52 #endif /* defined(OC_PAL_OVER_EMIOS) */
53 
54 #if defined(OC_PAL_OVER_ETIMER)
55 
56  #include "etimer_driver.h"
57 
58  /* The maximum of channel in each instance */
59  #define OC_PAL_NUM_OF_CHANNEL_MAX ETIMER_CH_COUNT
60  /* The number of instances are available */
61  #define NUMBER_OF_OC_PAL_INSTANCES NO_OF_ETIMER_INSTS_FOR_OC
62  /* The maximum of instance in ETIMER */
63  #define OC_PAL_INSTANCES_MAX ETIMER_INSTANCE_COUNT
64 #endif /* End of definition for Panther */
65 
72 typedef enum{
73 #if defined(FTM_INSTANCE_COUNT)
75 #endif /* defined(FTM_INSTANCE_COUNT) */
76 
77 #if defined(eMIOS_INSTANCE_COUNT)
78  OC_INST_TYPE_EMIOS = 1u,
79 #endif /* defined(eMIOS_INSTANCE_COUNT) */
80 
81 #if defined(ETIMER_INSTANCE_COUNT)
82  OC_INST_TYPE_ETIMER = 2u,
83 #endif /* defined(ETIMER_INSTANCE_COUNT) */
85 
86 
93 typedef struct{
95  uint32_t instIdx;
97 
98 
99 #endif /* OC_PAL_MAPPING_H */
oc_inst_type_t
Enumeration with the types of peripherals supported by OC_PAL.
uint32_t instIdx
oc_inst_type_t instType
Structure storing PAL instance information.