Go to the source code of this file.
Macros | |
#define | ERR_STATION_NAME_LENGTH -1 |
#define | ERR_FIRMWARE_VERSION_BAD -2 |
#define | ERR_FIRMWARE_LOAD_FAIL -3 |
#define | ERR_DRIVER_INIT_FAIL -4 |
#define | PRU_IEP_CMP_CFG_EN_SOG_EVENTS 0x000001cf /*sets cmp0, cmp2/5/6/7*/ |
#define | NO_RCV_NO_FWD 0 |
#define | RCV_NO_FWD 1 |
#define | NO_RCV_FWD 2 |
#define | RCV_FWD 3 |
#define | OFF 0 |
#define | UP 2 |
#define | RUN 4 |
#define | DISABLED 0 |
#define | BLOCKING 1 |
#define | FORWARDING 2 |
#define | fsoCompensation 150 |
#define | CpmOffloadFlag 0xFF |
#define | watchDogExpireDuration 100 |
Functions | |
int32_t | PN_initDrv (PN_Handle pnHandle) |
Initializes the Profinet Driver. More... | |
void | PN_getFirmwareVersion (uint32_t *version_major, uint32_t *version_minor, uint32_t *version_build, uint32_t *version_release_type) |
Get the details on version of firmware. More... | |
void | PN_getFirmwareReleaseInfoAndFeatures (uint32_t *firmware_release_1, uint32_t *firmware_release_2, uint32_t *firmware_feature_mask) |
Get the details on release information and features of firmware. More... | |
int32_t | PN_setDcpFilterStationName (PRUICSS_HwAttrs const *pruicssHwAttrs, const uint8_t *dcpNameOfStation, uint8_t lengthOfStationName) |
API to configure the station name and length of station name of device for filtering DCP Identify requests. More... | |
int32_t | PN_MRP_setPortState (PRUICSS_HwAttrs const *pruicssHwAttrs, uint8_t portNumber, uint8_t pState) |
API to set the MRP state for a port. More... | |
int32_t | PN_MRP_getPortState (PRUICSS_HwAttrs const *pruicssHwAttrs, uint8_t portNumber, uint8_t *pState) |
Returns the MRP state of a port. More... | |
int32_t | PN_mapPhaseToProfile (PRUICSS_HwAttrs const *pruicssHwAttrs, int32_t portNumber, int32_t phaseNumber, int32_t profileNumberRx, int32_t profileNumberTx) |
API to map a Phase to start of green Profile. More... | |
int32_t | PN_setMaxLineRxDelay (PRUICSS_HwAttrs const *pruicssHwAttrs, uint8_t portNumber, int32_t maxLineRxDelayValue) |
API to configure the maximum line receive delay. More... | |
int32_t | PN_setMaxBridgeDelay (PRUICSS_HwAttrs const *pruicssHwAttrs, int32_t maxBridgeDelayValue) |
API to configure the maximum bridge delay. This value comes from the GSD file. More... | |
int32_t | PN_setYellowPeriod (PRUICSS_HwAttrs const *pruicssHwAttrs, int32_t yellowPeriodTime) |
API to configure the yellow period. More... | |
int32_t | PN_setProfile (PRUICSS_HwAttrs const *pruicssHwAttrs, int32_t portNumber, int32_t profileNumber, int32_t rxSoGValue, int32_t txSoGValue) |
API to configure a Profile. In a profile the start of green time in a cycle for Receive (Rx) and Transmit (Tx) is set for a port. More... | |
void | PN_setCompensationValue (PRUICSS_HwAttrs const *pruicssHwAttrs, uint16_t compensationValue) |
API to configure the compensation value which is used while computing the forward FSO for a RTC3 frame which has to be forwarded. More... | |
int32_t | PN_setRedGuard (PRUICSS_HwAttrs const *pruicssHwAttrs, uint16_t validLowerFrameId, uint16_t validUpperFrameId) |
API to set the Red Guard for the device. More... | |
int32_t | PN_setRtc3PortStatus (PRUICSS_HwAttrs const *pruicssHwAttrs, uint8_t portNumber, uint8_t status) |
API to set the RTClass3 port status of a port. More... | |
int32_t | PN_setStaticFilterTable (PRUICSS_HwAttrs const *pruicssHwAttrs, const uint8_t *macAddr, uint8_t ctrl, uint8_t portNumber, uint8_t table) |
API to enable/disable the reception & forward for a Multicast address in port multicast filter tables. More... | |
int32_t | PN_setWatchDogTimer (PN_Handle pnHandle, int32_t timerPeriod) |
API to configure the ICSS watchdog expiry duration. More... | |
int32_t | PN_loadStaticTable (PRUICSS_HwAttrs const *pruicssHwAttrs, const uint32_t *staticTable, uint8_t staticTableLength, uint8_t staticTableType, uint8_t portNumber) |
PN_loadStaticTable API to load multicast static table to ICSS memory. More... | |
void | PN_cpmIsrHandler (void *arg) |
Profinet CPM ISR handler. More... | |
void | PN_ppmIsrHandler (void *arg) |
Profinet PPM ISR handler. More... | |
void | PN_dhtIsrHandler (void *arg) |
Profinet DHT ISR handler. More... | |
void | PN_PTCP_isrHandler (void *arg) |
Profinet PTCP ISR handler. More... | |
void | PN_CPMOffloadBypass (PRUICSS_HwAttrs const *pruicssHwAttrs) |
API to configure the FW to store RTC1 CPM frames in Queue0 instead of CPM buffers. To be called by stack before the firmware load. More... | |
#define ERR_STATION_NAME_LENGTH -1 |
Error code for Wrong station name length
#define ERR_FIRMWARE_VERSION_BAD -2 |
Error code for Wrong firmware version
#define ERR_FIRMWARE_LOAD_FAIL -3 |
Error code for failure in firmware loading
#define ERR_DRIVER_INIT_FAIL -4 |
Error code for failure in initializing driver
#define PRU_IEP_CMP_CFG_EN_SOG_EVENTS 0x000001cf /*sets cmp0, cmp2/5/6/7*/ |
#define NO_RCV_NO_FWD 0 |
No receive and no forward
#define RCV_NO_FWD 1 |
Receive but no forward
#define NO_RCV_FWD 2 |
No receive but forward
#define RCV_FWD 3 |
Receive and forward
#define OFF 0 |
RTClass3 status values of a port
#define UP 2 |
RTClass3 status values of a port
#define RUN 4 |
RTClass3 status values of a port
int32_t PN_initDrv | ( | PN_Handle | pnHandle | ) |
Initializes the Profinet Driver.
Sets the Port MAC addresses
Sets the Compensation value
Initialize the RTC driver
Initialize the PTCP driver
Set MRP port state
Loads the forward and receive multicast tables
Loads the Profinet firmware
pnHandle | Profinet Handle |
0 | on success Error codes : ERR_DRIVER_INIT_FAIL ERR_FIRMWARE_VERSION_BAD |
void PN_getFirmwareVersion | ( | uint32_t * | version_major, |
uint32_t * | version_minor, | ||
uint32_t * | version_build, | ||
uint32_t * | version_release_type | ||
) |
Get the details on version of firmware.
version_major | Reference to get the major version number |
version_minor | Reference to get the minor version number |
version_build | Reference to get the version build number |
version_release_type | Reference to get the firmware release type |
void PN_getFirmwareReleaseInfoAndFeatures | ( | uint32_t * | firmware_release_1, |
uint32_t * | firmware_release_2, | ||
uint32_t * | firmware_feature_mask | ||
) |
Get the details on release information and features of firmware.
firmware_release_1 | Reference to get the details from ICSS_FIRMWARE_RELEASE_1 |
firmware_release_2 | Reference to get the details from ICSS_FIRMWARE_RELEASE_2 |
firmware_feature_mask | Reference to get the firmware feature mask |
int32_t PN_MRP_setPortState | ( | PRUICSS_HwAttrs const * | pruicssHwAttrs, |
uint8_t | portNumber, | ||
uint8_t | pState | ||
) |
API to set the MRP state for a port.
[in] | pruicssHwAttrs | PRUICSS HW Attributes for base addresses |
[in] | portNumber | Port for which MRP state has to be configured ICSS_EMAC_PORT_1 (1) ICSS_EMAC_PORT_2 (2) |
[in] | pState | There are three valid values of the MRP port state DISABLED BLOCKING FORWARDING |
0 | on success |
int32_t PN_MRP_getPortState | ( | PRUICSS_HwAttrs const * | pruicssHwAttrs, |
uint8_t | portNumber, | ||
uint8_t * | pState | ||
) |
Returns the MRP state of a port.
[in] | pruicssHwAttrs | PRUICSS HW Attributes for base addresses |
[in] | portNumber | Port number whose MRP port state has to be returned ICSS_EMAC_PORT_1 (1) ICSS_EMAC_PORT_2 (2) |
[in] | pState | Reference to the MRP port state of the port |
0 | on success |