-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmb_os.h
131 lines (99 loc) · 4.61 KB
/
mb_os.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*
*********************************************************************************************************
* uC/Modbus
* The Embedded Modbus Stack
*
* Copyright 2003-2020 Silicon Laboratories Inc. www.silabs.com
*
* SPDX-License-Identifier: APACHE-2.0
*
* This software is subject to an open source license and is distributed by
* Silicon Laboratories Inc. pursuant to the terms of the Apache License,
* Version 2.0 available at www.apache.org/licenses/LICENSE-2.0.
*
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*
* MODBUS uC/OS-III LAYER INTERFACE
*
* Filename : mb_os.h
* Version : V2.14.00
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* MODULE
*********************************************************************************************************
*/
#ifndef MB_OS_MODULE_PRESENT
#define MB_OS_MODULE_PRESENT
/*
*********************************************************************************************************
* INCLUDE FILES
*********************************************************************************************************
*/
#include <os.h>
#include "mb_cfg.h"
/*
*********************************************************************************************************
* EXTERNS
*********************************************************************************************************
*/
#ifdef MB_OS_MODULE
#define MB_OS_EXT
#else
#define MB_OS_EXT extern
#endif
/*
*********************************************************************************************************
* DEFINES
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* DATA TYPES
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* GLOBAL VARIABLES
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* MACRO'S
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* FUNCTION PROTOTYPES
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* CONFIGURATION ERRORS
*********************************************************************************************************
*/
#if (OS_CFG_Q_EN == 0)
#error "MODBUS Slave requires uC/OS-III Message Queue Services."
#endif
#ifndef MB_OS_CFG_RX_TASK_PRIO
#error "MODBUS Missing Rx Task's MB_OS_CFG_RX_TASK_PRIO."
#endif
#ifndef MB_OS_CFG_RX_TASK_STK_SIZE
#error "MODBUS Missing Rx Task's MB_OS_CFG_RX_TASK_STK_SIZE."
#endif
#if (MODBUS_CFG_MASTER_EN == DEF_ENABLED)
#if (OS_CFG_SEM_EN == 0 )
#error "MODBUS Master requires uC/OS-III Semaphore Services."
#error "... It needs at least MODBUS_CFG_MAX_CH semaphores."
#endif
#endif
/*
*********************************************************************************************************
* MODULE END
*********************************************************************************************************
*/
#endif /* End of MB_OS module */