Documentation Index
Fetch the complete documentation index at: https://notevil.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
ethGetPhyConnector
Open topic with navigation
CAPL Functions » Ethernet » Function Overview » ethGetPhyConnector
Function Syntax
byte ethGetPhyConnector(ethernetPort port, EthernetPhyConnector& phyConnector);
Description
Gets the PHY connector.
Only supported for network-based configurations and physical measurement ports.
Parameters
- port: Ethernet port.
- phyConnector:
- 0: kEthernetPhyConnectorDefault (the only available connector on this channel)
- 1: kEthernetPhyConnectorRJ45
- 2: kEthernetPhyConnectorDSub
Return Values
Example
void print()
{
stack ethernetPort port = ethernetPort::Ethernet1::Port1;
stack enum EthernetPhyConnector connector;
if (ethGetPhyConnector(port, connector) != 0)
{
printConnector(connector);
}
}
void printConnector(enum EthernetPhyConnector connector)
{
char str[64];
switch (connector)
{
case kEthernetPhyConnectorDefault:
strncpy(str, "kEthernetPhyConnectorDefault", elcount(str));
break;
case kEthernetPhyConnectorRJ45:
strncpy(str, "kEthernetPhyConnectorRJ45", elcount(str));
break;
case kEthernetPhyConnectorDSub:
strncpy(str, "kEthernetPhyConnectorUnknown", elcount(str));
break;
default:
write("error");
return;
}
write("connector: %s", str);
}