XilinxProcessorIPLib/drivers/axiethernet/examples/avb/xavb_ptp_packets.c
void XAvb_MasterSendAnnounce(XAvb * InstancePtr) {
  u32 Unused = 0;


  /** Wait until there are no PTP frames to be transmitted */
  XAvb_WaitOnTxPtpQueue(InstancePtr);

  /** Increment the sequenceId */
  Unused = XAvb_IncSequenceId(InstancePtr->Config.BaseAddress,
                              XAVB_PTP_TX_ANNOUNCE_OFFSET);

#ifdef DEBUG_XAVB_LEVEL3
  xil_printf("\r\n--------------------------------");
  xil_printf("\r\n---XAvb_MasterSendAnnounce()----");
  xil_printf("\r\n--------------------------------");
  xil_printf("\r\nsequenceId is %x", Unused);
  Unused  = XAvb_ReadReg(InstancePtr->Config.BaseAddress,
                          XAVB_RTC_NANOSEC_VALUE_OFFSET);
  Unused  = XAvb_ReadReg(InstancePtr->Config.BaseAddress,
                          XAVB_RTC_SEC_LOWER_VALUE_OFFSET);
  xil_printf("\r\nSeconds %d", Unused);
#endif

  /** Send the Announce Frame! */
  XAvb_WriteReg(InstancePtr->Config.BaseAddress,
                 XAVB_PTP_TX_CONTROL_OFFSET,
                 XAVB_PTP_TX_SEND_ANNOUNCE_FRAME_MASK);
}
/****************************************************************************/
/**
*
* A function to format then request the transmission of a PTP Announce Packet
*
* @param  InstancePtr is a pointer to the XAvb instance to be worked on
*
* @return None.  But the relevant Tx PTP Packet Buffer is written to with the
*                updated PTP fields, and then the Tx PTP Packet Buffer Control
*                Register is written to request the frame transmission.
*
* @note   None.
*
*****************************************************************************/
A function to format then request the transmission of a PTP Announce Packet
A function to format then request the transmission of a PTP Announce Packet
void XAvb_MasterSendAnnounce(XAvb * InstancePtr) {
  u32 Unused = 0;
  XAvb_WaitOnTxPtpQueue(InstancePtr);
  Unused = XAvb_IncSequenceId(InstancePtr->Config.BaseAddress,
                              XAVB_PTP_TX_ANNOUNCE_OFFSET);
#ifdef DEBUG_XAVB_LEVEL3
  xil_printf("\r\n--------------------------------");
  xil_printf("\r\n---XAvb_MasterSendAnnounce()----");
  xil_printf("\r\n--------------------------------");
  xil_printf("\r\nsequenceId is %x", Unused);
  Unused  = XAvb_ReadReg(InstancePtr->Config.BaseAddress,
                          XAVB_RTC_NANOSEC_VALUE_OFFSET);
  Unused  = XAvb_ReadReg(InstancePtr->Config.BaseAddress,
                          XAVB_RTC_SEC_LOWER_VALUE_OFFSET);
  xil_printf("\r\nSeconds %d", Unused);
#endif
  XAvb_WriteReg(InstancePtr->Config.BaseAddress,
                 XAVB_PTP_TX_CONTROL_OFFSET,
                 XAVB_PTP_TX_SEND_ANNOUNCE_FRAME_MASK);
}
void XAvb_MasterSendAnnounce ( XAvb * InstancePtr ) { u32 Unused = 0 ; XAvb_WaitOnTxPtpQueue ( InstancePtr ) ; Unused = XAvb_IncSequenceId ( InstancePtr -> Config . BaseAddress , XAVB_PTP_TX_ANNOUNCE_OFFSET ) ; #ifdef DEBUG_XAVB_LEVEL3 xil_printf ( " \r \n " ) ; xil_printf ( " \r \n " ) ; xil_printf ( " \r \n " ) ; xil_printf ( " \r \n " , Unused ) ; Unused = XAvb_ReadReg ( InstancePtr -> Config . BaseAddress , XAVB_RTC_NANOSEC_VALUE_OFFSET ) ; Unused = XAvb_ReadReg ( InstancePtr -> Config . BaseAddress , XAVB_RTC_SEC_LOWER_VALUE_OFFSET ) ; xil_printf ( " \r \n " , Unused ) ; #endif XAvb_WriteReg ( InstancePtr -> Config . BaseAddress , XAVB_PTP_TX_CONTROL_OFFSET , XAVB_PTP_TX_SEND_ANNOUNCE_FRAME_MASK ) ; }
A function to format then request the transmission of a PTP Announce Packet
A function to format then request the transmission of a PTP Announce Packet
/** Wait until there are no PTP frames to be transmitted */ /** Increment the sequenceId */ /** Send the Announce Frame! */