ISF  2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
MQX1.h
Go to the documentation of this file.
1 /** ###################################################################
2 ** THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
3 ** Filename : MQX1.h
4 ** Project : ISF_K64F_CW_PROJ
5 ** Processor : MK64FN1M0VLL12
6 ** Version : Component 01.110, Driver 01.00, CPU db: 3.00.000
7 ** Compiler : GNU C Compiler
8 ** Date/Time : 2015-03-03, 11:16, # CodeGen: 3
9 ** Abstract :
10 ** MQX Lite RTOS Adapter component.
11 ** Settings :
12 **
13 ** Copyright : 1997 - 2014 Freescale Semiconductor, Inc.
14 ** All Rights Reserved.
15 **
16 ** Redistribution and use in source and binary forms, with or without modification,
17 ** are permitted provided that the following conditions are met:
18 **
19 ** o Redistributions of source code must retain the above copyright notice, this list
20 ** of conditions and the following disclaimer.
21 **
22 ** o Redistributions in binary form must reproduce the above copyright notice, this
23 ** list of conditions and the following disclaimer in the documentation and/or
24 ** other materials provided with the distribution.
25 **
26 ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
27 ** contributors may be used to endorse or promote products derived from this
28 ** software without specific prior written permission.
29 **
30 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
31 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
32 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
33 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
34 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
35 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
37 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
39 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 **
41 ** http: www.freescale.com
42 ** mail: support@freescale.com
43 ** ###################################################################*/
44 /*!
45 ** @file MQX1.h
46 ** @version 01.00
47 ** @brief
48 ** MQX Lite RTOS Adapter component.
49 */
50 /*!
51 ** @addtogroup MQX1_module MQX1 module documentation
52 ** @{
53 */
54 
55 #ifndef __MQX1_H
56 #define __MQX1_H
57 
58 /* MODULE MQX1. */
59 
60 /* Include shared modules, which are used for whole project */
61 #include "PE_Types.h"
62 #include "PE_Error.h"
63 #include "PE_Const.h"
64 #include "IO_Map.h"
65 /* Include inherited components */
66 #include "SystemTimer1.h"
67 #include "task_template_list.h"
68 /* MQX Lite include files */
69 #include "mqxlite.h"
70 #include "mqxlite_prv.h"
71 
72 
73 /* Path to MQX Lite source files */
74 #define MQX_PATH "C:/Freescale/CW MCU v10.6/MCU/ProcessorExpert/lib/mqxlite/V1.1.1/"
75 
76 void SystemTimer1_OnCounterRestart(LDD_TUserData *UserDataPtr);
77 uint32_t SystemTimer1_GetTicsPerSecond(LDD_TDeviceData *DeviceDataPtr);
78 
79 
80 /* MQX Lite entrypoint */
81 void __boot(void);
82 /* SVC handler - called after SVC instruction */
83 void _svc_handler(void);
84 /* PendSV handler - task switch functionality */
85 void _pend_svc(void);
86 /* MQX Lite adapter system timer functions */
87 uint32_t system_timer_init (const void * timer_data_ptr);
88 uint32_t system_timer_start(const void * timer_data_ptr);
89 
90 #define MQXLITE_SYSTEM_TIMER_INIT(param) system_timer_init(param)
91 #define MQXLITE_SYSTEM_TIMER_START(param) system_timer_start(param)
92 #define MQXLITE_SYSTEM_TIMER_GET_INPUT_FREQUENCY(param) \
93  SystemTimer1_GetInputFrequency(param)
94 #define MQXLITE_SYSTEM_TIMER_GET_PERIOD_TICKS(param, value) \
95  SystemTimer1_GetPeriodTicks(param, value)
96 #define MQXLITE_SYSTEM_TIMER_GET_COUNTER_VALUE(param) \
97  SystemTimer1_GetCounterValue(param)
98 #define MQXLITE_SYSTEM_TIMER_GET_TICKS_PER_SECOND(param) \
99  SystemTimer1_GetTicsPerSecond(param)
100 #define MQXLITE_SYSTEM_TIMER_SET_HWTICKS_FUNCTION(param) \
101  _time_set_hwtick_function((MQX_GET_HWTICKS_FPTR)&SystemTimer1_GetCounterValue, (pointer)(param))
102 
103 void mqx_initialize_heap(void);
104 
105 
106 /* Task stacks declarations */
107 extern uint8_t Task1_task_stack[TASK1_TASK_STACK_SIZE];
108 extern uint8_t CI_task_stack[CI_TASK_STACK_SIZE];
109 extern uint8_t PM_task_stack[PM_TASK_STACK_SIZE];
110 extern uint8_t TaskBusManager_task_stack[TASKBUSMANAGER_TASK_STACK_SIZE];
111 extern uint8_t Fusion_Task_task_stack[FUSION_TASK_TASK_STACK_SIZE];
112 extern uint8_t MagCal_Task_task_stack[MAGCAL_TASK_TASK_STACK_SIZE];
113 extern uint8_t TaskRLI1_task_stack[TASKRLI1_TASK_STACK_SIZE];
114 extern uint8_t TaskApp1_task_stack[TASKAPP1_TASK_STACK_SIZE];
115 
116 /* MQX Lite init structure and task template list */
117 extern const MQXLITE_INITIALIZATION_STRUCT MQX_init_struct;
118 extern const TASK_TEMPLATE_STRUCT MQX_template_list[];
119 
120 
121 /* MQX Lite initialization function */
122 #define PEX_RTOS_INIT() if (MQX_OK != _mqxlite_init(&MQX_init_struct)) while(1)
123 /* MQX Lite start function */
124 #define PEX_RTOS_START() _mqxlite()
125 
126 
127 /* The first interrupt vector that the application wants to have a 'C' ISR for. */
128 #define FIRST_INTERRUPT_VECTOR_USED (INT_SysTick)
129 /* The last interrupt vector that the application wants to handle. */
130 #define LAST_INTERRUPT_VECTOR_USED (INT_ENET_Error)
131 #define MQX_INTERRUPT_TABLE_ITEMS (LAST_INTERRUPT_VECTOR_USED - FIRST_INTERRUPT_VECTOR_USED + 1)
132 /* The table of 'C' handlers for interrupts. */
133 extern INTERRUPT_TABLE_STRUCT mqx_static_isr_table[MQX_INTERRUPT_TABLE_ITEMS];
134 
135 
136 /* Task ready queue */
137 #define MQX_IDLE_TASK_PRIORITY (14)
138 #define MQX_READY_QUEUE_ITEMS (MQX_IDLE_TASK_PRIORITY + 1)
139 extern READY_Q_STRUCT mqx_static_ready_queue[MQX_READY_QUEUE_ITEMS];
140 
141 /* Task stacks array of pointers */
142 extern const uint8_t * mqx_task_stack_pointers[];
143 
144 void PEX_RTOS_InstallInterrupt(IRQInterruptIndex IntVector, void (*IsrFunction)(void *), void *IsrParam);
145 /*
146 ** ===================================================================
147 ** Method : MQX1_PEX_RTOS_InstallInterrupt (component MQXLite)
148 **
149 ** Description :
150 ** Installs the interrupt service routine through the RTOS.
151 ** This method is internal. It is used by Processor Expert only.
152 ** ===================================================================
153 */
154 
155 
156 void MQX1_SetOperationMode(LDD_TDriverOperationMode OperationMode);
157 /*
158 ** ===================================================================
159 ** Method : MQX1_SetOperationMode (component MQXLite)
160 **
161 ** Description :
162 ** This method is internal. It is used by Processor Expert only.
163 ** ===================================================================
164 */
165 
166 /* Backward compatibility */
167 #define MQXLITE_SYSTEM_TIMER_GET_TICS_PER_SECOND MQXLITE_SYSTEM_TIMER_GET_TICKS_PER_SECOND
168 
169 /* END MQX1. */
170 
171 #endif
172 /*!
173 ** @}
174 */
175 /*
176 ** ###################################################################
177 **
178 ** This file was created by Processor Expert 10.3 [05.09]
179 ** for the Freescale Kinetis series of microcontrollers.
180 **
181 ** ###################################################################
182 */
uint8_t TaskRLI1_task_stack[TASKRLI1_TASK_STACK_SIZE]
Definition: MQX1.c:69
uint8_t TaskApp1_task_stack[TASKAPP1_TASK_STACK_SIZE]
Definition: MQX1.c:70
READY_Q_STRUCT mqx_static_ready_queue[MQX_READY_QUEUE_ITEMS]
Definition: MQX1.c:91
INTERRUPT_TABLE_STRUCT mqx_static_isr_table[MQX_INTERRUPT_TABLE_ITEMS]
Definition: MQX1.c:94
uint8_t MagCal_Task_task_stack[MAGCAL_TASK_TASK_STACK_SIZE]
Definition: MQX1.c:68
#define MQX_INTERRUPT_TABLE_ITEMS
Definition: MQX1.h:131
uint8_t CI_task_stack[CI_TASK_STACK_SIZE]
Definition: MQX1.c:64
const MQXLITE_INITIALIZATION_STRUCT MQX_init_struct
This data structure/variable holds the complete state of the rli magnetometer sensor embedded applica...
Definition: MQX1.c:103
uint32_t system_timer_init(const void *timer_data_ptr)
Definition: MQX1.c:142
void SystemTimer1_OnCounterRestart(LDD_TUserData *UserDataPtr)
Definition: MQX1.c:124
void __boot(void)
uint8_t Fusion_Task_task_stack[FUSION_TASK_TASK_STACK_SIZE]
Definition: MQX1.c:67
#define MQX_READY_QUEUE_ITEMS
Definition: MQX1.h:138
uint8_t TaskBusManager_task_stack[TASKBUSMANAGER_TASK_STACK_SIZE]
Definition: MQX1.c:66
void _svc_handler(void)
uint8_t PM_task_stack[PM_TASK_STACK_SIZE]
Definition: MQX1.c:65
uint8_t Task1_task_stack[TASK1_TASK_STACK_SIZE]
Definition: MQX1.c:63
void PEX_RTOS_InstallInterrupt(IRQInterruptIndex IntVector, void(*IsrFunction)(void *), void *IsrParam)
Definition: MQX1.c:206
const uint8_t * mqx_task_stack_pointers[]
Definition: MQX1.c:73
void mqx_initialize_heap(void)
Definition: MQX1.c:176
void MQX1_SetOperationMode(LDD_TDriverOperationMode OperationMode)
Definition: MQX1.c:226
uint32_t SystemTimer1_GetTicsPerSecond(LDD_TDeviceData *DeviceDataPtr)
Definition: MQX1.c:131
void _pend_svc(void)
uint32_t system_timer_start(const void *timer_data_ptr)
Definition: MQX1.c:164
const TASK_TEMPLATE_STRUCT MQX_template_list[]