xgs3.h (1219B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * File: xgs3.h 8 * Purpose: Definitions for XGS3 systems. 9 */ 10 11 #ifndef _BCM_INT_XGS3_H_ 12 #define _BCM_INT_XGS3_H_ 13 14 /* Color MACROs */ 15 16 #define _BCM_XGS3_COLOR_GREEN 0 17 #define _BCM_XGS3_COLOR_YELLOW 3 18 #define _BCM_XGS3_COLOR_RED 1 19 #define _BCM_XGS3_COLOR_NONE 0 20 21 #define _BCM_COLOR_ENCODING(unit, color) \ 22 (SOC_IS_XGS3_SWITCH(unit) ? \ 23 (((color) == bcmColorGreen) ? _BCM_XGS3_COLOR_GREEN : \ 24 (((color) == bcmColorYellow) ? _BCM_XGS3_COLOR_YELLOW : \ 25 (((color) == bcmColorRed) ? _BCM_XGS3_COLOR_RED : \ 26 _BCM_XGS3_COLOR_NONE))) : \ 27 _BCM_XGS3_COLOR_NONE) 28 29 #define _BCM_COLOR_DECODING(unit, hw_color) \ 30 (SOC_IS_XGS3_SWITCH(unit) ? \ 31 ((hw_color) == _BCM_XGS3_COLOR_GREEN) ? bcmColorGreen : \ 32 ((hw_color) == _BCM_XGS3_COLOR_YELLOW) ? bcmColorYellow : \ 33 (((hw_color) == _BCM_XGS3_COLOR_RED) ? bcmColorRed : bcmColorGreen) \ 34 : bcmColorGreen) 35 36 37 #endif /* !_BCM_INT_XGS3_H_ */