/******************************************************************************
* Copyright (C) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
* SPDX-License-Identifier: MIT
******************************************************************************/
/*
 * helloworld.c: simple test application
 *
 * This application configures UART 16550 to baud rate 9600.
 * PS7 UART (Zynq) is not initialized by this application, since
 * bootrom/bsp configures it to baud rate 115200
 *
 * ------------------------------------------------
 * | UART TYPE   BAUD RATE                        |
 * ------------------------------------------------
 *   uartns550   9600
 *   uartlite    Configurable only in HW design
 *   ps7_uart    115200 (configured by bootrom/bsp)
 */

#include <stdio.h>
#include "platform.h"
#include "xil_printf.h"
#include "xparameters.h"

volatile u32 * myperptr=(u32 *)XPAR_PERTEST_0_BASEADDR;
volatile u32 * ledptr=(u32 *)XPAR_XGPIO_0_BASEADDR;

u32 dummy;

int main()
{
    
    init_platform();

    print("Hello World\n\r");
    print("Successfully ran Hello World application\n\r");

    while (1==1)
    {
        dummy=*myperptr;
        *ledptr=dummy;
        xil_printf("%i\n\r",dummy);
    }
    cleanup_platform();
    return 0;
}
