AM64x MCU+ SDK  08.00.00
iPnOs.h File Reference

Go to the source code of this file.

Enumerations

enum  tMrpStates {
  MRPREADY, MRPENTER, MRPWAIT, MRPCHECK,
  MRPEXIT
}
 

Functions

uint8_t * PN_getPpmBuff (t_rtcPacket *pkt)
 Return a pointer to buffer indicated by NEXT
This will be the next available free buffer(in the triple buffer scheme). Stack can now fill this buffer and once done call PN_relPpmBuff to indicate the PRU on new data. More...
 
uint8_t * PN_relPpmBuff (PN_Handle pnHandle, t_rtcPacket *pkt)
 Swap NEXT with LAST and return new NEXT address
. More...
 
int32_t PN_checkLastPPM (PN_Handle pnHandle, t_rtcPacket *pkt)
 Update proc pointer in paket object and udpate descriptor if there is a new last buffer. More...
 
int32_t PN_nextCpmRdy (PN_Handle pnHandle, t_rtcPacket *pkt)
 Swap CPM NEXT with LAST and set validLast flag. More...
 
uint8_t * PN_getLastCpm (PN_Handle pnHandle, t_rtcPacket *pkt)
 Swap CPM LAST with PROC if validLast is true, clear validLast flag. More...
 
uint32_t PN_enterFlushMode (PN_Handle pnHandle)
 Used to signal topology change to MRP state machine. More...
 
tLegStates PN_getLegState (void)
 Returns the IRT Legacy mode state. More...
 
void PN_setLegState (void *arg, void *arg2)
 Sets the state of legacy state machine This API is registered as a callback in PN_registerSetState. More...
 
void PN_setLegPkt (void *arg, void *arg2)
 Sets the Ethernet packet to output during legacy startup Usually a copy of RTC3 PPM. This API is registered as a callback in PN_registerSetPkt. More...
 
int32_t PN_initOs (PN_Handle pnHandle)
 Initialization function for all PN driver tasks, mutexes. More...
 
int32_t PN_RTC_setupIsr (PN_Handle pnHandle)
 Interrupt management function Initializes PPM/CPM/DHT interrupts. (OS dependent!) More...
 
int32_t PN_RTC_enableISR (PN_Handle pnHandle)
 Enables the PN interrupts. More...
 
int32_t PN_RTC_disableISR (PN_Handle pnHandle)
 Disables the PN interrupts. More...
 
int32_t PN_OS_txPacket (ICSS_EMAC_Handle icssEmacHandle, const uint8_t *srcAddress, int32_t portNumber, int32_t queuePriority, int32_t lengthOfPacket)
 Switch driver extension of TxPacket. More...
 

Function Documentation

◆ PN_initOs()

int32_t PN_initOs ( PN_Handle  pnHandle)

Initialization function for all PN driver tasks, mutexes.

Parameters
pnHandleProfinet Handle
Returns
None

◆ PN_RTC_setupIsr()

int32_t PN_RTC_setupIsr ( PN_Handle  pnHandle)

Interrupt management function Initializes PPM/CPM/DHT interrupts. (OS dependent!)

Return values
0on success

◆ PN_RTC_enableISR()

int32_t PN_RTC_enableISR ( PN_Handle  pnHandle)

Enables the PN interrupts.

Parameters
[in]pnHandleProfinet HAndle
Return values
0on Success

◆ PN_RTC_disableISR()

int32_t PN_RTC_disableISR ( PN_Handle  pnHandle)

Disables the PN interrupts.

Parameters
pnHandleProfinet Handle
Return values
0on Success

◆ PN_OS_txPacket()

int32_t PN_OS_txPacket ( ICSS_EMAC_Handle  icssEmacHandle,
const uint8_t *  srcAddress,
int32_t  portNumber,
int32_t  queuePriority,
int32_t  lengthOfPacket 
)

Switch driver extension of TxPacket.

This is using a critical section to protect re-entry of TX function. The protection scheme is borrowed from NDK and we use their code too. This requires to adhere to NDK priority scheme

Parameters
[in]icssEmacHandleICSS Emac LLD handle
srcAddresspointer to TX packet
portNumberoutput port number
queuePriorityoutput queue priority
lengthOfPacketTX packet length (without CRC)