-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrtl_rldp.hpp
More file actions
186 lines (175 loc) · 4.55 KB
/
Copy pathrtl_rldp.hpp
File metadata and controls
186 lines (175 loc) · 4.55 KB
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#ifndef _rtl_rldp_hpp_
#define _rtl_rldp_hpp_
#include <Arduino.h>
extern "C"
{
#include "rldp.h"
#include "rtk_types.h"
}
class rtl_rldp
{
public:
/* Function Name:
* rtl_rldp_config_set
* Description:
* Set RLDP module configuration
* Input:
* pConfig - configuration structure of RLDP
* Output:
* None
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_INPUT
* RT_ERR_NULL_POINTER
* Note:
* None
*/
rtk_api_ret_t rtl_rldp_config_set(rtk_rldp_config_t *pConfig)
{
return rtk_rldp_config_set(pConfig);
}
/* Function Name:
* rtl_rldp_config_get
* Description:
* Get RLDP module configuration
* Input:
* None
* Output:
* pConfig - configuration structure of RLDP
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_INPUT
* RT_ERR_NULL_POINTER
* Note:
* None
*/
rtk_api_ret_t rtl_rldp_config_get(rtk_rldp_config_t *pConfig)
{
return rtk_rldp_config_get(pConfig);
}
/* Function Name:
* rtl_rldp_portConfig_set
* Description:
* Set per port RLDP module configuration
* Input:
* port - port number to be configured
* pPortConfig - per port configuration structure of RLDP
* Output:
* None
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_INPUT
* RT_ERR_NULL_POINTER
* Note:
* None
*/
rtk_api_ret_t rtl_rldp_portConfig_set(rtk_port_t port, rtk_rldp_portConfig_t *pPortConfig)
{
return rtk_rldp_portConfig_set(port, pPortConfig);
}
/* Function Name:
* rtl_rldp_portConfig_get
* Description:
* Get per port RLDP module configuration
* Input:
* port - port number to be get
* Output:
* pPortConfig - per port configuration structure of RLDP
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_INPUT
* RT_ERR_NULL_POINTER
* Note:
* None
*/
rtk_api_ret_t rtl_rldp_portConfig_get(rtk_port_t port, rtk_rldp_portConfig_t *pPortConfig)
{
return rtk_rldp_portConfig_get(port, pPortConfig);
}
/* Function Name:
* rtl_rldp_status_get
* Description:
* Get RLDP module status
* Input:
* None
* Output:
* pStatus - status structure of RLDP
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_NULL_POINTER
* Note:
* None
*/
rtk_api_ret_t rtl_rldp_status_get(rtk_rldp_status_t *pStatus)
{
return rtk_rldp_status_get(pStatus);
}
/* Function Name:
* rtl_rldp_portStatus_get
* Description:
* Get RLDP module status
* Input:
* port - port number to be get
* Output:
* pPortStatus - per port status structure of RLDP
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_INPUT
* RT_ERR_NULL_POINTER
* Note:
* None
*/
rtk_api_ret_t rtl_rldp_portStatus_get(rtk_port_t port, rtk_rldp_portStatus_t *pPortStatus)
{
return rtk_rldp_portStatus_get(port, pPortStatus);
}
/* Function Name:
* rtl_rldp_portStatus_set
* Description:
* Clear RLDP module status
* Input:
* port - port number to be clear
* pPortStatus - per port status structure of RLDP
* Output:
* None
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_INPUT
* RT_ERR_NULL_POINTER
* Note:
* Clear operation effect loop_enter and loop_leave only, other field in
* the structure are don't care
*/
rtk_api_ret_t rtl_rldp_portStatus_set(rtk_port_t port, rtk_rldp_portStatus_t *pPortStatus)
{
return rtk_rldp_portStatus_set(port, pPortStatus);
}
/* Function Name:
* rtl_rldp_portLoopPair_get
* Description:
* Get RLDP port loop pairs
* Input:
* port - port number to be get
* Output:
* pPortmask - per port related loop ports
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_INPUT
* RT_ERR_NULL_POINTER
* Note:
* None
*/
rtk_api_ret_t rtl_rldp_portLoopPair_get(rtk_port_t port, rtk_portmask_t *pPortmask)
{
return rtk_rldp_portLoopPair_get(port, pPortmask);
}
};
#endif