4kW dsPIC33C PSFB DC-DC DA (Part-No. )
Content
Loading...
Searching...
No Matches
os_scheduler.h
1
//=======================================================================================================
2
// Copyright(c) 2018 Microchip Technology Inc. and its subsidiaries.
3
// Subject to your compliance with these terms, you may use Microchip software and any derivatives
4
// exclusively with Microchip products. It is your responsibility to comply with third party license
5
// terms applicable to your use of third-party software (including open source software) that may
6
// accompany Microchip software.
7
// THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY,
8
// APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND
9
// FITNESS FOR A PARTICULAR PURPOSE.
10
// IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
11
// LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
12
// MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
13
// ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT
14
// EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
15
//=======================================================================================================
16
17
//=======================================================================================================
18
// @file os_scheduler_1ms.h
19
//
20
// @brief contains the main scheduler that calls all the tasks that need to be called regularly
21
//
22
// @note put your application specific tasks that need to be called regularly into main_tasks.c
23
// @note call the Init function in your main.c
24
// @note call the OS_Scheduler_Run in your main loop or call the RunForever-Function in your main.c
25
//
26
// @version v1.0
27
// @date 2019-08-02
28
// @author M52409
29
//
30
//=======================================================================================================
31
32
33
#ifndef _OS_SCHEDULER_H_
34
#define _OS_SCHEDULER_H_
35
36
37
#ifdef __cplusplus
// Provide C++ Compatibility
38
extern
"C"
{
39
#endif
40
41
42
//=======================================================================================================
43
// @brief Initializes Scheduler
44
// @note call this function in your main routine before calling the RunForever function
45
//=======================================================================================================
46
extern
void
OS_Scheduler_Init(
void
);
47
48
//=======================================================================================================
49
// @brief Scheduler function for calling all the Tasks regularly ( 1ms, 10ms, 100ms, 1s )
50
// @note call this function in your main loop in main.c after calling the Init-function
51
// if you have nothing else to call in your main loop then you can call the function
52
// Main_Scheduler_RunForever() instead.
53
// please consider that the timing of the calls are dependent on the duration of the last call
54
// the resulting jitter therefore depends on the timing of the calls before
55
//=======================================================================================================
56
extern
void
OS_Scheduler_RunOnce(
void
);
57
58
//=======================================================================================================
59
// @brief Scheduler function for calling all the Tasks regularly ( 1ms, 10ms, 100ms, 1s )
60
// @note call this function as last function in main.c after calling the Init-function
61
// please consider that the timing of the calls are dependent on the duration of the last call
62
// the resulting jitter therefore depends on the timing of the calls before
63
//=======================================================================================================
64
extern
void
OS_Scheduler_RunForever(
void
);
65
66
//=======================================================================================================
67
// The following extern Tasks_... functions should be placed in the file main/main_tasks.c
68
// call OS_Scheduler_Run() in the main loop or call OS_Scheduler_RunForever() in main.c
69
//=======================================================================================================
70
extern
void
Tasks_100us(
void
);
71
extern
void
Tasks_Realtime_100us(
void
);
72
extern
void
Tasks_Realtime_1ms(
void
);
73
extern
void
Tasks_1ms(
void
);
74
extern
void
Tasks_10ms(
void
);
75
extern
void
Tasks_100ms(
void
);
76
extern
void
Tasks_1s(
void
);
77
extern
void
Tasks_Background(
void
);
78
extern
void
TMR1_CallBack(
void
);
79
#ifdef __cplusplus
// Provide C++ Compatibility
80
}
81
#endif
82
#endif
// _OS_SCHEDULER_H_
© Copyright 1998-2022 Microchip Technology Inc. All rights reserved.