sonic-buildimage/device/tencent/x86_64-tencent_tcs8400-r0/prbs.cint

17 lines
696 B
Plaintext
Raw Normal View History

void set_port_prbs(int unit_port, int enable){
int status;
bcm_port_control_set(0, unit_port, bcmPortControlPrbsPolynomial, 6);
bcm_port_control_set(0, unit_port, bcmPortControlPrbsRxEnable, 0);
bcm_port_control_set(0, unit_port, bcmPortControlPrbsTxEnable, 0);
if(enable == 1){
bcm_port_control_set(0, unit_port, bcmPortControlPrbsRxEnable, 1);
bcm_port_control_set(0, unit_port, bcmPortControlPrbsTxEnable, 1);
bcm_port_control_get(0, unit_port, bcmPortControlPrbsRxStatus, &status);
}
}
int get_port_prbs_result(int unit_port){
int status;
bcm_port_control_get(0, unit_port, bcmPortControlPrbsRxStatus, &status);
return status;
}