sonic-buildimage/device/tencent/x86_64-tencent_tcs8400-r0/prbs.cint
mssonicbld ab0533e646
two platforms supporting S3IP SYSFS (TCS8400, TCS9400) (#12386) (#13210)
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

Co-authored-by: tianshangfei <31125751+tianshangfei@users.noreply.github.com>
2023-01-09 11:40:35 +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;
}