17 lines
696 B
Plaintext
17 lines
696 B
Plaintext
|
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;
|
||
|
}
|