sonic-buildimage/device/tencent/x86_64-tencent_tcs8400-r0/prbs.cint
tianshangfei b65e06f998
two platforms supporting S3IP SYSFS (TCS8400, TCS9400) (#12386)
Why I did it
Add two platform that support s3IP framework

How I did it
Add two platforms supporting S3IP SYSFS (TCS8400, TCS9400)

How to verify it
Manual test
2022-12-18 16:16:53 +08:00

17 lines
696 B
Plaintext
Executable File

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;
}