realtek-doc/sources/rtk-dms1250/include/dal/cypress/dal_cypress_eee.h
Markus Stockhausen 9efeb307bd rename folders
2025-04-27 16:04:49 -04:00

216 lines
5.4 KiB
C

/*
* Copyright (C) 2009-2016 Realtek Semiconductor Corp.
* All Rights Reserved.
*
* This program is the proprietary software of Realtek Semiconductor
* Corporation and/or its licensors, and only be used, duplicated,
* modified or distributed under the authorized license from Realtek.
*
* ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER
* THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
*
* $Revision$
* $Date$
*
* Purpose : Definition those public EEE routing APIs and its data type in the SDK.
*
* Feature : The file have include the following module and sub-modules
* 1) EEE enable/disable
*/
#ifndef __DAL_CYPRESS_EEE_H__
#define __DAL_CYPRESS_EEE_H__
/*
* Include Files
*/
#include <common/rt_type.h>
#include <rtk/eee.h>
#include <dal/dal_mapper.h>
/*
* Symbol Definition
*/
/*
* Data Declaration
*/
/*
* Macro Declaration
*/
/*
* Function Declaration
*/
/* Function Name:
* dal_cypress_eeeMapper_init
* Description:
* Hook eee module of the specified device.
* Input:
* unit - unit id
* Output:
* None
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* Note:
* Must Hook eee module before calling any eee APIs.
*/
extern int32
dal_cypress_eeeMapper_init(dal_mapper_t *pMapper);
/* Function Name:
* dal_cypress_eee_init
* Description:
* Initialize EEE module of the specified device.
* Input:
* unit - unit id
* Output:
* None
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_UNIT_ID - invalid unit id
* Note:
* Must initialize EEE module before calling any EEE APIs.
*/
extern int32
dal_cypress_eee_init(uint32 unit);
/* Module Name : EEE */
/* Sub-module Name: EEE enable/disable */
/* Function Name:
* dal_cypress_eee_portEnable_get
* Description:
* Get enable status of EEE function in the specified port.
* Input:
* unit - unit id
* port - port id
* Output:
* pEnable - pointer to enable status of EEE
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_NOT_INIT - The module is not initial
* RT_ERR_UNIT_ID - invalid unit id
* RT_ERR_PORT_ID - invalid port id
* RT_ERR_NULL_POINTER - input parameter may be null pointer
* Note:
* None
*/
extern int32
dal_cypress_eee_portEnable_get(uint32 unit, rtk_port_t port, rtk_enable_t *pEnable);
/* Function Name:
* dal_cypress_eee_portEnable_set
* Description:
* Set enable status of EEE function in the specified port.
* Input:
* unit - unit id
* port - port id
* enable - enable status of EEE
* Output:
* None
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_NOT_INIT - The module is not initial
* RT_ERR_UNIT_ID - invalid unit id
* RT_ERR_PORT_ID - invalid port id
* RT_ERR_INPUT - invalid input parameter
* Note:
* None
*/
extern int32
dal_cypress_eee_portEnable_set(uint32 unit, rtk_port_t port, rtk_enable_t enable);
/* Function Name:
* dal_cypress_eee_portState_get
* Description:
* Get the EEE nego result state of a port.
* Input:
* unit - unit id
* port - port id
* Output:
* pState - pointer to the EEE port nego result state
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_NOT_INIT - The module is not initial
* RT_ERR_NULL_POINTER - input parameter may be null pointer
* Note:
* None
*/
extern int32
dal_cypress_eee_portState_get(
uint32 unit,
rtk_port_t port,
rtk_enable_t *pState);
/* Function Name:
* dal_cypress_eee_portPowerState_get
* Description:
* Get the EEE power state of a port.
* Input:
* unit - unit id
* port - port id
* direction - ingress or egress direction
* Output:
* pState - pointer to the EEE port power state
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_NOT_INIT - The module is not initial
* RT_ERR_NULL_POINTER - input parameter may be null pointer
* Note:
* None
*/
extern int32
dal_cypress_eee_portPowerState_get(uint32 unit, rtk_port_t port, rtk_eee_direction_t direction, rtk_eee_power_state_t *pState);
/* Function Name:
* dal_cypress_eeep_portEnable_get
* Description:
* Get enable status of EEEP function in the specified port.
* Input:
* unit - unit id
* port - port id
* Output:
* pEnable - pointer to enable status of EEEP
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_NOT_INIT - The module is not initial
* RT_ERR_UNIT_ID - invalid unit id
* RT_ERR_PORT_ID - invalid port id
* RT_ERR_NULL_POINTER - input parameter may be null pointer
* Note:
* None
*/
extern int32 dal_cypress_eeep_portEnable_get(uint32 unit, rtk_port_t port, rtk_enable_t *pEnable);
/* Function Name:
* dal_cypress_eeep_portEnable_set
* Description:
* Set enable status of EEEP function in the specified port.
* Input:
* unit - unit id
* port - port id
* enable - enable status of EEEP
* Output:
* None
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_NOT_INIT - The module is not initial
* RT_ERR_UNIT_ID - invalid unit id
* RT_ERR_PORT_ID - invalid port id
* RT_ERR_INPUT - invalid input parameter
* Note:
* None
*/
extern int32 dal_cypress_eeep_portEnable_set(uint32 unit, rtk_port_t port, rtk_enable_t enable);
#endif /* __DAL_CYPRESS_EEE_H__ */