Digital Power Starter Kit 3 Firmware
dsPIC33C Boost Converter Voltage Mode Control Example
rtos_typedef.h
1 /* Microchip Technology Inc. and its subsidiaries. You may use this software
2  * and any derivatives exclusively with Microchip products.
3  *
4  * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
5  * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
6  * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
7  * PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION
8  * WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION.
9  *
10  * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
11  * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
12  * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
13  * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
14  * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS
15  * IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF
16  * ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
17  *
18  * MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE
19  * TERMS.
20  */
21 
22 /*
23  * File: rtos_typedef.h
24  * Author: M91406
25  * Comments:
26  * Revision history:
27  * 1.0 initial release
28  */
29 
30 // This is a guard condition so that contents of this file are not included
31 // more than once.
32 #ifndef RTOS_TYPE_DEFINITION_HEADER_H
33 #define RTOS_TYPE_DEFINITION_HEADER_H
34 
35 #include <xc.h> // include processor files - each processor file is guarded.
36 #include <stdint.h> // include standard integer data types
37 #include <stdbool.h> // include standard boolean data types
38 #include <dsp.h> // include DSP data types
39 
40 /***********************************************************************************
41  * @ingroup operating-system-properties
42  * @struct OS_TASKMGR_STATUS_s
43  * @extends OS_TASK_MANAGER_s
44  * @brief Task manager status word
45  * @details
46  * ADD_DETAILED_DESCRIPTION
47  **********************************************************************************/
49  union {
50  struct {
51  unsigned lp_active : 1;
52  unsigned hp_active : 1;
53  unsigned lp_timeout : 1;
54  unsigned isr_timeout : 1;
55  unsigned : 1;
56  unsigned : 1;
57  unsigned : 1;
58  unsigned : 1;
59 
60  unsigned : 1;
61  unsigned : 1;
62  unsigned : 1;
63  unsigned : 1;
64  unsigned : 1;
65  unsigned : 1;
66  unsigned : 1;
67  unsigned disable : 1;
68  } __attribute__((packed)) bits;
69  volatile uint16_t value;
70  };
71 };
73 
74 /***********************************************************************************
75  * @ingroup operating-system-properties
76  * @struct OS_TASKMGR_TIMEBASE_s
77  * @extends OS_TASK_MANAGER_s
78  * @brief Task scheduler time-base parameters
79  * @details
80  * ADD_DETAILED_DESCRIPTION
81  **********************************************************************************/
83 
84  volatile int32_t Counter;
85  volatile int32_t period;
86 
87 };
89 
90 /***********************************************************************************
91  * @ingroup operating-system-properties
92  * @struct OS_TASKMGR_CPU_LOAD_s
93  * @extends OS_TASK_MANAGER_s
94  * @brief Data structure holding CPU load runtime information
95  * @details
96  * ADD_DETAILED_DESCRIPTION
97  **********************************************************************************/
99 
100  volatile fractional cpu_load;
101 
102 };
104 
105 /***********************************************************************************
106  * @ingroup operating-system-properties
107  * @struct OS_TASK_MANAGER_s
108  * @brief Data structure wrapping up tasks list of different priorities
109  * @details
110  * ADD_DETAILED_DESCRIPTION
111  **********************************************************************************/
113  volatile struct OS_TASKMGR_STATUS_s Status;
114  volatile struct OS_TASKMGR_TIMEBASE_s Timebase;
115  volatile struct OS_TASKMGR_CPU_LOAD_s CpuLoad;
116 };
117 typedef struct OS_TASK_MANAGER_s OS_TASK_MANAGER_t;
118 
119 
120 
121 #endif /* RTOS_TYPE_DEFINITION_HEADER_H */
122 
123 // end of file
unsigned disable
When set, causes the execution of main() to be terminated resulting in a CPU reset.
Definition: rtos_typedef.h:67
unsigned hp_active
Bit 1: Flag indicating that low-priority task queue is executed frequently.
Definition: rtos_typedef.h:52
volatile struct OS_TASKMGR_TIMEBASE_s Timebase
Task manager time base monitor.
Definition: rtos_typedef.h:114
volatile int32_t Counter
Operating system task execution tick counter.
Definition: rtos_typedef.h:84
unsigned lp_timeout
Bit 2: Flag indicating that a low-priority queue timeout occured.
Definition: rtos_typedef.h:53
unsigned lp_active
Bit 0: Flag indicating that high-priority task queue is executed frequently.
Definition: rtos_typedef.h:51
Task manager data status.
Definition: rtos_typedef.h:48
volatile struct OS_TASKMGR_CPU_LOAD_s CpuLoad
Task manager CPU load metering result.
Definition: rtos_typedef.h:115
volatile struct OS_TASKMGR_STATUS_s Status
Task manager status word.
Definition: rtos_typedef.h:113
volatile fractional cpu_load
Operating system task execution tick counter.
Definition: rtos_typedef.h:100
unsigned isr_timeout
Bit 3: Flag indicating that OS timer interrupt has timed out.
Definition: rtos_typedef.h:54
volatile int32_t period
Operating system task execution period.
Definition: rtos_typedef.h:85
volatile uint16_t value
Status word value.
Definition: rtos_typedef.h:69