Go to the source code of this file.
Macros | |
| #define | PTCP_TASK_PRIORITY 26 |
| #define | SYNC_MONITOR_TASK_PRIORITY 11 |
| #define | LEGACY_MODE_TASK_PRIOROTY 3 |
| #define | MRP_TASK_PRIORITY 23 |
| #define | BACKGROUND_TASK_PRIORITY 11 |
| #define | MRPD_TASK_PRIORITY 22 |
| #define | PN_OS_API_SUCCESS 0 |
| #define | PN_ERR_INIT_PTCP_TASK (-1) |
| #define | PN_ERR_INIT_SYNC_MONITOR (-2) |
| #define | PN_ERR_INIT_LEGACY_MODE (-3) |
| #define | PN_ERR_INIT_MRP_TASK (-4) |
| #define | PN_ERR_INIT_BACKGROUND_TASK (-5) |
| #define | PN_ERR_INIT_MRPD_TASK (-6) |
| #define | PN_ERR_PKT_TYPE_NOT_PPM (-7) |
| #define | PN_ERR_PKT_TYPE_NOT_CPM (-8) |
| #define | PN_ERR_INVALID_BUFF_INDEX (-9) |
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 (PN_Handle pnHandle, const uint8_t *srcAddress, int32_t portNumber, int32_t queuePriority, int32_t lengthOfPacket) |
| Switch driver extension of TxPacket. More... | |
| #define PTCP_TASK_PRIORITY 26 |
| #define SYNC_MONITOR_TASK_PRIORITY 11 |
| #define LEGACY_MODE_TASK_PRIOROTY 3 |
| #define MRP_TASK_PRIORITY 23 |
| #define BACKGROUND_TASK_PRIORITY 11 |
| #define MRPD_TASK_PRIORITY 22 |
| int32_t PN_initOs | ( | PN_Handle | pnHandle | ) |
Initialization function for all PN driver tasks, mutexes.
| pnHandle | Profinet Handle |
| int32_t PN_RTC_setupIsr | ( | PN_Handle | pnHandle | ) |
Interrupt management function Initializes PPM/CPM/DHT interrupts. (OS dependent!)
| 0 | on success |
| int32_t PN_RTC_enableISR | ( | PN_Handle | pnHandle | ) |
Enables the PN interrupts.
| [in] | pnHandle | Profinet HAndle |
| 0 | on Success |
| int32_t PN_RTC_disableISR | ( | PN_Handle | pnHandle | ) |
Disables the PN interrupts.
| pnHandle | Profinet Handle |
| 0 | on Success |
| int32_t PN_OS_txPacket | ( | PN_Handle | pnHandle, |
| 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
| [in] | pnHandle | Profinet Handle |
| srcAddress | pointer to TX packet | |
| portNumber | output port number | |
| queuePriority | output queue priority | |
| lengthOfPacket | TX packet length (without CRC) |