/*
 * serialPort_helper.h
 *
 * History:
 *    2021-12-16 - wk - added prototype for getCharFromPSUART
 *    2021-08-16 - wk - updated to support both MPSoC and Versal
 *    2016-05-03 - wk - initial
 */

#ifndef SRC_SERIALPORT_HELPER_H_
#define SRC_SERIALPORT_HELPER_H_

#include "xparameters.h"

// determine which platform we're running on so that the correct header files are loaded
#if (CPU_TYPE==13)                     /* arbitrary value for uB processor */
#include "xuartlite_l.h"
#elif (CPU_TYPE==7000)                 /* Zynq 7000 */
#include "xuartps.h"
#include "xuartps_hw.h"
#elif (CPU_TYPE==53)                   /* MPSoC/RFSoC A53 */
#include "xuartps.h"
#include "xuartps_hw.h"
#elif (CPU_TYPE==72)                   /* Versal A72 */
#include "xuartpsv.h"
#include "xuartpsv_hw.h"
#endif

// function prototypes
char getCharFromPSUART(int echo);
char getCharFromUART(int echo);
void putCharToUART(char c);

#endif /* SRC_SERIALPORT_HELPER_H_ */

//<copyright-disclaimer-start>
//<copyright-disclaimer-start>
//  **************************************************************************************************************
//  * © 2024 Advanced Micro Devices, Inc. All rights reserved.                                                   *
//  * DISCLAIMER                                                                                                 *
//  * The information contained herein is for informational purposes only, and is subject to change              *
//  * without notice. While every precaution has been taken in the preparation of this document, it              *
//  * may contain technical inaccuracies, omissions and typographical errors, and AMD is under no                *
//  * obligation to update or otherwise correct this information.  Advanced Micro Devices, Inc. makes            *
//  * no representations or warranties with respect to the accuracy or completeness of the contents of           *
//  * this document, and assumes no liability of any kind, including the implied warranties of noninfringement,  *
//  * merchantability or fitness for particular purposes, with respect to the operation or use of AMD            *
//  * hardware, software or other products described herein.  No license, including implied or                   *
//  * arising by estoppel, to any intellectual property rights is granted by this document.  Terms and           *
//  * limitations applicable to the purchase or use of AMD’s products are as set forth in a signed agreement     *
//  * between the parties or in AMD's Standard Terms and Conditions of Sale. GD-18                               *
//  *                                                                                                            *
//  **************************************************************************************************************
//<copyright-disclaimer-end>
//<copyright-disclaimer-end>
