-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create proxy switch_pd_lag.h file (#123)
- Created switchapi/es2k/switch_pd_lag.h to act as a proxy for the version-specific switch_pd_lag.h files. It encapsulates the knowledge that there is more than one version of the header file. Signed-off-by: Derek G Foster <[email protected]>
- Loading branch information
Showing
3 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright 2024 Intel Corporation. | ||
* SPDX-License_Identifier: Apache-2.0 | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// Proxy for the version-specific switch_pd_lag.h files. | ||
// | ||
// This header file encapsulates the knowledge that there are different | ||
// versions of the header file. | ||
// | ||
// Note that it must use a different include guard than the files it | ||
// includes. | ||
|
||
#ifndef __SWITCH_PD_LAG_WRAPPER_H__ | ||
#define __SWITCH_PD_LAG_WRAPPER_H__ | ||
|
||
#if defined(LNW_V2) | ||
#include "lnw_v2/switch_pd_lag.h" | ||
#elif defined(LNW_V3) | ||
#include "lnw_v3/switch_pd_lag.h" | ||
#else | ||
#error "Undefined or missing LNW conditional!" | ||
#endif | ||
|
||
#endif // __SWITCH_PD_LAG_WRAPPER_H__ |