本文整理汇总了C++中rtl8370_setAsicRegBit函数的典型用法代码示例。如果您正苦于以下问题:C++ rtl8370_setAsicRegBit函数的具体用法?C++ rtl8370_setAsicRegBit怎么用?C++ rtl8370_setAsicRegBit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rtl8370_setAsicRegBit函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: rtl8370_setAsicLedSerialEnable
/*
@func ret_t | rtl8370_setAsicLedSerialEnable | Turn on/off Led serial mode
@parm uint32 | enable | LED serial configuration.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_PORT_ID | Invalid port number.
@rvalue RT_ERR_INPUT | Invalid input value.
@comm
The API can turn on/off led of serial mode.
*/
ret_t rtl8370_setAsicLedSerialEnable(uint32 enable)
{
ret_t retVal;
if (enable > 1)
return RT_ERR_FAILED;
if (enable == 1)
{
/*Enable serial CLK mode*/
if((retVal = rtl8370_setAsicRegBit(RTL8370_REG_SCAN0_LED_IO_EN,RTL8370_LED_SERI_CLK_EN_OFFSET, 1))!= RT_ERR_OK)
return retVal;
/*Enable serial DATA mode*/
if((retVal = rtl8370_setAsicRegBit(RTL8370_REG_SCAN0_LED_IO_EN,RTL8370_LED_SERI_DATA_EN_OFFSET, 1))!= RT_ERR_OK)
return retVal;
}
else
{
/*Disable serial CLK mode*/
if((retVal = rtl8370_setAsicRegBit(RTL8370_REG_SCAN0_LED_IO_EN,RTL8370_LED_SERI_CLK_EN_OFFSET, 0))!= RT_ERR_OK)
return retVal;
/*Disable serial DATA mode*/
if((retVal = rtl8370_setAsicRegBit(RTL8370_REG_SCAN0_LED_IO_EN,RTL8370_LED_SERI_DATA_EN_OFFSET, 0))!= RT_ERR_OK)
return retVal;
}
return RT_ERR_OK;
}
开发者ID:mausvt,项目名称:seagate_central_cns3420_2-6-35,代码行数:40,代码来源:rtl8370_asicdrv_led.c
示例2: rtl8370_setAsicRrcpV2Trap8051
/*
@func ret_t | rtl8370_setAsicRrcpV2Trap8051 | Set trap to 8051 setting enable/disable.
@parm uint32 | trap | 0: disable/1: enable.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
This API set trap RRCPv2 frame to 8051 enable/disable
Trap to RRCP frame to 8051 setting. If this bit is set, ASIC will
not handled the received RRCP frame.
*/
ret_t rtl8370_setAsicRrcpV2Trap8051(uint32 trap)
{
ret_t retVal;
if(trap > 1)
return RT_ERR_INPUT;
retVal = rtl8370_setAsicRegBit(RTL8370_RRCP_CTRL0_REG, RTL8370_RRCP_TRAP_8051_OFFSET, trap);
if(retVal != RT_ERR_OK)
return retVal;
retVal = rtl8370_setAsicRegBit(RTL8370_OLD_RRCP_CTRL, RTL8370_RRCP_TRAP_8051_OFFSET, trap);
return retVal;
}
开发者ID:LXiong,项目名称:openwrt-rtk,代码行数:26,代码来源:rtl8370_asicdrv_rrcp.c
示例3: rtl8370_setAsic1xMBOpdirConfig
/*
@func ret_t | rtl8370_setAsic1xMBOpdirConfig | Set 802.1x mac-based operational direction configuration
@parm uint32 | opdir | Operation direction 1: IN, 0:BOTH
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@comm
The API can update the mac-based operational direction register content.
*/
ret_t rtl8370_setAsic1xMBOpdirConfig(uint32 opdir)
{
if(opdir > 1)
return RT_ERR_ENABLE;
return rtl8370_setAsicRegBit(RTL8370_DOT1X_CFG_REG, RTL8370_DOT1X_MAC_OPDIR_OFFSET, opdir);
}
开发者ID:alessiocarrafa,项目名称:dsl-n55u-bender,代码行数:15,代码来源:rtl8370_asicdrv_dot1x.c
示例4: rtl8370_setAsicLutIpMulticastLookup
/*
@func ret_t | rtl8370_setAsicLutIpMulticastLookup | Set Lut IP multicast lookup function.
@parm uint32 | enabled | Lut IP multicast checking function 1: enabled, 0: disabled.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_ENABLE | Invalid enable input.
@common
ASIC will auto learn and write L2 look up entry. Auto learning L2 look up table contained DMAC and source port information only. System supports L2 entry
with IP multicast DIP/SIP to forward IP multicasting frame as user desired. If this function is enabled, then system will be looked up L2 IP multicast entry to
forward IP multicast frame directly without flooding. The L2 IP multicast forwarding path can be as port mask and not as same as auto learn L2 enrty with source
port information only. Both IP_MULT and Static fields of LUT must be wrote by software and these fields of auto learn entries will be 0 by ASIC.
*/
ret_t rtl8370_setAsicLutIpMulticastLookup(uint32 enabled)
{
if(enabled > 1)
return RT_ERR_ENABLE;
return rtl8370_setAsicRegBit(RTL8370_REG_LUT_CFG, RTL8370_IPMCAST_LOOKUP_OFFSET, enabled);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:20,代码来源:rtl8370_asicdrv_lut.c
示例5: rtl8370_setAsicRldpEnable8051
/*
@func ret_t | rtl8370_setAsicRldpEnable | Set RLDP function handled by ASIC or 8051.
@parm uint32 | enable | 1: enabled 8051, 0: disabled 8051 (RLDP is handled by ASIC).
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
This API set RLDP_8051_ENABLE
If RLDP_8051_ENABLE is set, RLDP is handled by 8051. Otherwise,
ASIC will handled RLDP.
*/
ret_t rtl8370_setAsicRldpEnable8051(uint32 enable)
{
if(enable > 1)
return RT_ERR_INPUT;
return rtl8370_setAsicRegBit(RTL8370_RLDP_CTRL0_REG, RTL8370_RLDP_8051_ENABLE_OFFSET, enable);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:18,代码来源:rtl8370_asicdrv_rldp.c
示例6: rtl8370_setAsicRldpIndicatorSource
/*
@func ret_t | rtl8370_setAsicRldpIndicatorSource | Set buzzer and LED source when detecting a loop.
@parm uint32 | enable | 0: ASIC, 1: 8051
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
This API set the buzzer and LED source.
Buzzer and LED source can be from ASIC or 8051. RLDP_INDICATOR_SOURCE
decides the source
*/
ret_t rtl8370_setAsicRldpIndicatorSource(uint32 src)
{
if(src > 1)
return RT_ERR_INPUT;
return rtl8370_setAsicRegBit(RTL8370_RLDP_CTRL0_REG, RTL8370_RLDP_INDICATOR_SOURCE_OFFSET, src);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:18,代码来源:rtl8370_asicdrv_rldp.c
示例7: rtl8370_setAsicRldpCompareRandomNumber
/*
@func ret_t | rtl8370_setAsicRldpCompareRandomNumber | Set RLDP_COMP_ID.
@parm uint32 | enable | 1: enabled comparing random number, 0: disabled comparing random number.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
This API set RLDP_COMP_ID
If RLDP_COMP_ID is set, ASIC will compare the random number field and
seed field of RLDP frame with those of ASIC to recognize whether a RLDP
frame is sent by itself. If RLDP_COMP_ID is 0, ASIC only compare the seed
field
*/
ret_t rtl8370_setAsicRldpCompareRandomNumber(uint32 enable)
{
if(enable > 1)
return RT_ERR_INPUT;
return rtl8370_setAsicRegBit(RTL8370_RLDP_CTRL0_REG, RTL8370_RLDP_COMP_ID_OFFSET, enable);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:20,代码来源:rtl8370_asicdrv_rldp.c
示例8: rtl8370_setAsicGreenEthernet
/*
@func int32 | rtl8370_setAsicGreenEthernet | Set green ethernet function.
@parm uint32 | green | Green feature function usage 1:enable 0:disable.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@comm
The API can set Green Ethernet function to reduce power consumption. While green feature is enabled, ASIC will automatic
detect the cable length and then select different power mode for best performance with minimums power consumption. Link down
ports will enter power savining mode in 10 seconds after the cable disconnected if power saving function is enabled.
*/
ret_t rtl8370_setAsicGreenEthernet(uint32 green)
{
if (green > 1)
return RT_ERR_INPUT;
return rtl8370_setAsicRegBit(RTL8370_REG_PHY_AD,6,green);
}
开发者ID:xtra72,项目名称:s805,代码行数:17,代码来源:rtl8370_asicdrv_green.c
示例9: rtl8370_setAsicPortEgressRateIfg
/*
@func ret_t | rtl8370_setAsicPortEgressRateIfg | Set per-port egress rate calculate include/exclude IFG
@parm uint32 | ifg | 1:include IFG 0:exclude IFG
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
The API can set egress rate with IFG or not.
*/
ret_t rtl8370_setAsicPortEgressRateIfg(uint32 ifg)
{
if(ifg > 1)
return RT_ERR_INPUT;
return rtl8370_setAsicRegBit(RTL8370_REG_SCHEDULE_WFQ_CTRL, RTL8370_WFQ_IFG_OFFSET, ifg);
}
开发者ID:LXiong,项目名称:openwrt-rtk,代码行数:16,代码来源:rtl8370_asicdrv_scheduling.c
示例10: index
/*
@func ret_t | rtl8370_setAsicShareMeter | Set meter configuration
@parm uint32 | index | Shared meter index (0-63) of 64 shared meter index
@parm uint32 | rate | 17-bits rate of share meter, unit is 8Kpbs
@parm uint32 | ifg | Rate's calculation including IFG 1:include 0:exclude
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_INPUT | Invalid input parameter
@rvalue RT_ERR_RATE | Invalid rate
@rvalue RT_ERR_FILTER_METER_ID | Invalid meter
@comm
The API can set shared meter rate and ifg include for each meter. Rate unit is 8Kbps.
*/
ret_t rtl8370_setAsicShareMeter(uint32 index, uint32 rate ,uint32 ifg)
{
ret_t retVal;
if(index > RTL8370_METERMAX)
return RT_ERR_FILTER_METER_ID;
if(rate > RTL8370_QOS_GRANULARTY_MAX)
return RT_ERR_RATE;
if(ifg > 1)
return RT_ERR_INPUT;
/*17-bits Rate*/
retVal = rtl8370_setAsicReg(RTL8370_METER_RATE_REG(index), (rate & 0xFFFF));
if(retVal != RT_ERR_OK)
return retVal;
retVal = rtl8370_setAsicReg(RTL8370_METER_RATE_REG(index) + 1, ((rate & 0x10000) >> 16));
if(retVal != RT_ERR_OK)
return retVal;
/*IFG*/
return rtl8370_setAsicRegBit(RTL8370_METER_IFG_CTRL_REG(index), RTL8370_METER_IFG_OFFSET(index), ifg);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:38,代码来源:rtl8370_asicdrv_meter.c
示例11: rtl8370_setAsic1xGVOpdir
/*
@func ret_t | rtl8370_setAsic1xGVOpdir | Set 802.1x guest vlan talk to auth. DA
@parm uint32 | enabled | 0:disable 1:enable
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_DOT1X_GVLANTALK | Invalid operation direction input.
@comm
The API can update the 802.1x guest vlan talk to auth. DA content.
*/
ret_t rtl8370_setAsic1xGVOpdir(uint32 enabled)
{
if(enabled > 1)
return RT_ERR_DOT1X_GVLANTALK;
return rtl8370_setAsicRegBit(RTL8370_DOT1X_CFG_REG, RTL8370_DOT1X_GVOPDIR_OFFSET, enabled);
}
开发者ID:alessiocarrafa,项目名称:dsl-n55u-bender,代码行数:16,代码来源:rtl8370_asicdrv_dot1x.c
示例12: rtl8370_setAsicEeelldpInterrupt8051
/*
@func ret_t | rtl8370_setAsicEeelldpInterrupt8051 | Set interrupt to 8051/not interrupt to 8051 while receiving a eeelldp.
@parm uint32 | interrupt | 1: interrupt, 0: do not interrupt.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
This API set the enabling of interrupting to 8051 when switch receives a EEELLDP packet.
If EEELLDP function is enabled, upon receiving an eeelldp frame,
ASIC will interrupt to 8051
*/
ret_t rtl8370_setAsicEeelldpInterrupt8051(uint32 interrupt_en)
{
if (interrupt_en > 1)
return RT_ERR_INPUT;
return rtl8370_setAsicRegBit(RTL8370_EEELLDP_CTRL0_REG, RTL8370_EEELLDP_INT_8051_OFFSET, interrupt_en);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:18,代码来源:rtl8370_asicdrv_eeelldp.c
示例13: rtl8370_setAsicPortEnableAll
/*
@func ret_t | rtl8370_setAsicPortEnableAll | Set ALL ports enable.
@parm uint32 |enable | enable all ports.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_FAILED | Invalid parameter.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
This API can set all ports enable.
*/
ret_t rtl8370_setAsicPortEnableAll(uint32 enable)
{
if(enable >= 2)
return RT_ERR_INPUT;
return rtl8370_setAsicRegBit(RTL8370_REG_PHY_AD, RTL8370_PHY_AD_DUMMY_1_OFFSET, !enable);
}
开发者ID:xtra72,项目名称:s805,代码行数:17,代码来源:rtl8370_asicdrv_port.c
示例14: rtl8370_setAsicVlanFilter
/*
@func ret_t | rtl8370_setAsicVlanFilter | Configure enable CVLAN filtering function
@parm uint32 | enabled | CVLAN filtering function 1: enabled, 0: disabled.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_ENABLE | Invalid enable parameter.
@comm
The API can set CVLAN both egress/ingress filtering enable function.
*/
ret_t rtl8370_setAsicVlanFilter(uint32 enabled)
{
if ((enabled != 0) && (enabled != 1))
return RT_ERR_ENABLE;
return rtl8370_setAsicRegBit(RTL8370_VLAN_FILTERING_REG, RTL8370_VLAN_FILTERING_OFFSET, enabled);
}
开发者ID:schidler,项目名称:flyzjhz-rt-n56u,代码行数:16,代码来源:rtl8370_asicdrv_vlan.c
示例15: index
/*
@func ret_t | rtl8370_setAsicAcl | Set rule comparison result inversion / no inversion.
@parm uint32 | index | ACL rule index (0-63) of 64 ACL rules.
@parm uint32 | not | 1: inverse, 0: don't inverse.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_FILTER_ENTRYIDX | Invalid ACL rule index (0-63).
@comm
The API can set not bit of ACL rules
If the not bit of a rule is set, the comparison result will be inversed.
*/
ret_t rtl8370_setAsicAclNot(uint32 index, uint32 not)
{
if(index > RTL8370_ACLRULEMAX)
return RT_ERR_FILTER_ENTRYIDX;
return rtl8370_setAsicRegBit(RTL8370_ACL_ACTION_CTRL_REG(index), RTL8370_ACL_OP_NOT_OFFSET(index), not);
}
开发者ID:LXiong,项目名称:openwrt-rtk,代码行数:18,代码来源:rtl8370_asicdrv_acl.c
示例16: number
/*
@func ret_t | rtl8370_setAsicAclUnmatchedPermit | Set port acl function unmatched permit action.
@parm uint32 | port | Physical port number (0~15).
@parm uint32 | enabled | 1: Enable, 0: Disable.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_PORT_ID | Invalid port number.
@comm
The API can set per-port ACL unmatched action. (permit or drop)
*/
ret_t rtl8370_setAsicAclUnmatchedPermit(uint32 port, uint32 enabled)
{
if(port > RTL8370_PORTIDMAX)
return RT_ERR_PORT_ID;
return rtl8370_setAsicRegBit(RTL8370_ACL_UNMATCH_PERMIT_REG,port, enabled);
}
开发者ID:LXiong,项目名称:openwrt-rtk,代码行数:17,代码来源:rtl8370_asicdrv_acl.c
示例17: rtl8370_setAsicPortMirrorRxFunction
/*
@func ret_t | rtl8370_setAsicPortMirrorRxFunction | Enable the mirror function on RX of the mirrored port.
@parm uint32 | enabled | 1: enabled, 0: disabled.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_ENABLE | Invalid enable input.
@comm
If the API is setted to enabled, the RX of mirrored port will be mirrorred to
the current monitor port.
*/
ret_t rtl8370_setAsicPortMirrorRxFunction(uint32 enabled)
{
if(enabled > 1)
return RT_ERR_ENABLE;
return rtl8370_setAsicRegBit(RTL8370_MIRROR_CTRL_REG, RTL8370_MIRROR_RX_OFFSET, enabled);
}
开发者ID:LXiong,项目名称:openwrt-rtk,代码行数:17,代码来源:rtl8370_asicdrv_mirror.c
示例18: rtl8370_setAsicSvlanIngressUnmatch
/*
@func ret_t | rtl8370_setAsicSvlanIngressUnmatch | Configure enable trap received unmatched Stag frame to CPU from unplink port.
@parm uint32 | enabled | Trap received unmatched Stag frame to CPU 1: enabled, 0: disabled.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_ENABLE | Invalid enable parameter.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
The API can set trapping function in uplink port while receiving unmatched Stag frame.
*/
ret_t rtl8370_setAsicSvlanIngressUnmatch(uint32 enabled)
{
if((enabled != 0) && (enabled != 1))
return RT_ERR_ENABLE;
return rtl8370_setAsicRegBit(RTL8370_REG_SVLAN_CFG, RTL8370_VS_UNMAT_OFFSET, enabled);
}
开发者ID:appleorange1,项目名称:asus-rt-n12-lx,代码行数:17,代码来源:rtl8370_asicdrv_svlan.c
示例19: rtl8370_setAsicCputagEnable
/*
@func ret_t | rtl8370_setAsicCputagEnable | Set cpu tag function enable/disable.
@parm uint32 | enable | 1: enabled, 0: disabled.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_ENABLE | Invalid enable/disable input.
@comm
The API can set CPU TAG enable function.
If CPU tag function is disabled, CPU tag will not be added to frame
forwarded to CPU port, and all ports cannot parse CPU tag.
*/
ret_t rtl8370_setAsicCputagEnable(uint32 enable)
{
if(enable > 1)
return RT_ERR_ENABLE;
return rtl8370_setAsicRegBit(RTL8370_CPU_CTRL_REG, RTL8370_CPU_EN_OFFSET, enable);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:19,代码来源:rtl8370_asicdrv_cputag.c
示例20: rtl8370_setAsicSvlanEgressUnassign
/*
@func ret_t | rtl8370_setAsicSvlanEgressUnassign | Configure unplink stream without egress SVID action.
@parm uint32 | enabled | 1:Trap egress unassigned frames to CPU, 0: Use SVLAN setup in VS_CPSVIDX as egress SVID.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_ENABLE | Invalid enable parameter.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
The API can set trapping function in uplink port while the egress frame is unassigned.
*/
ret_t rtl8370_setAsicSvlanEgressUnassign(uint32 enabled)
{
if((enabled != 0) && (enabled != 1))
return RT_ERR_ENABLE;
return rtl8370_setAsicRegBit(RTL8370_REG_SVLAN_CFG, RTL8370_VS_UIFSEG_OFFSET, enabled);
}
开发者ID:appleorange1,项目名称:asus-rt-n12-lx,代码行数:17,代码来源:rtl8370_asicdrv_svlan.c
注:本文中的rtl8370_setAsicRegBit函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论