/*
 * main.c
 *
 *  Created on: 2022825
 *      Author: Administrator
 */


#include <stdio.h>
#include <xparameters.h>
#include <xgpiops.h>


#define Input_Pin = 47;	//PS_KEY
#define Output_Pin = 7; //PS_LED

static XGpioPs Gpio; /* The Instance of the GPIO Driver */

int main(void)
{

	XGpioPs_Config *ConfigPtr;
	ConfigPtr = XGpioPs_LookupConfig(XPAR_AXI_GPIO_0_DEVICE_ID);
	XGpioPs_CfgInitialize(Gpio, ConfigPtr, ConfigPtr->BaseAddr);

	/* Set the direction for the specified pin to be input */
	XGpioPs_SetDirectionPin(Gpio, Input_Pin, 0x0);

	/* Set the direction for the specified pin to be output. */
	XGpioPs_SetDirectionPin(Gpio, Output_Pin, 1);
	XGpioPs_SetOutputEnablePin(Gpio, Output_Pin, 1);
	XGpioPs_WritePin(Gpio, Output_Pin, 0x0);

}
