/*
 *
 * Xilinx, Inc.
 * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A 
 * COURTESY TO YOU.  BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
 * ONE POSSIBLE   IMPLEMENTATION OF THIS FEATURE, APPLICATION OR 
 * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION 
 * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE 
 * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION
 * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO 
 * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO 
 * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE 
 * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY 
 * AND FITNESS FOR A PARTICULAR PURPOSE.
 */

/*
 * 
 *
 * This file is a generated sample test application.
 *
 * This application is intended to test and/or illustrate some 
 * functionality of your system.  The contents of this file may
 * vary depending on the IP in your system and may use existing
 * IP driver functions.  These drivers will be generated in your
 * SDK application project when you run the "Generate Libraries" menu item.
 *
 */

#include <stdio.h>
#include "xparameters.h"
#include "xil_cache.h"
#include "xiomodule.h"
#include "iomodule_header.h"
#include "xil_exception.h"
#include "iomodule_intr_header.h"
#include "uartlite_header.h"
int main() 
{
   static XIOModule intc;
   static XIOModule iomodule_0_IOModule;
   Xil_ICacheEnable();
   Xil_DCacheEnable();
   print("---Entering main---\n\r");
   
   {
      XStatus status;

      print("\r\nRunning IOModuleSelfTestExample() for iomodule_0...\r\n");

      status = IOModuleSelfTestExample(XPAR_IOMODULE_0_DEVICE_ID);

      if (status == 0) {
         print("IOModuleSelfTestExample PASSED\r\n");
      }
      else {
         print("IOModuleSelfTestExample FAILED\r\n");
      }
   }
   {
      XStatus status;

      print("\r\nRunning Interrupt Test for iomodule_0...\r\n");

      status = IOModuleIntrExample(&iomodule_0_IOModule, XPAR_IOMODULE_0_DEVICE_ID);

      if (status == 0) {
         print("IOModule Interrupt Test PASSED\r\n");
      } 
      else {
         print("IOModule Interrupt Test FAILED\r\n");
      }
   }
   

   {
      int status;
      
      print("\r\nRunning UartLiteSelfTestExample() for debug_mdm_0...\r\n");
      status = UartLiteSelfTestExample(XPAR_DEBUG_MDM_0_DEVICE_ID);
      if (status == 0) {
         print("UartLiteSelfTestExample PASSED\r\n");
      }
      else {
         print("UartLiteSelfTestExample FAILED\r\n");
      }
      
   }
   print("---Exiting main---\n\r");
   Xil_DCacheDisable();
   Xil_ICacheDisable();
   return 0;
}
