From 644719528fd5e2a19064985864fd6634cabb5fac Mon Sep 17 00:00:00 2001 From: sorgelig Date: Sat, 24 Jun 2017 02:29:18 +0800 Subject: [PATCH] Fix the GPI flag. --- fpga_io.c | 2 +- fpga_io.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fpga_io.c b/fpga_io.c index a1ac013..a77ce4c 100644 --- a/fpga_io.c +++ b/fpga_io.c @@ -540,7 +540,7 @@ uint32_t fpga_gpo_read() return gpo_copy; //readl((void*)(SOCFPGA_MGR_ADDRESS + 0x10)); } -uint32_t fpga_gpi_read() +int fpga_gpi_read() { return readl((void*)(SOCFPGA_MGR_ADDRESS + 0x14)); } diff --git a/fpga_io.h b/fpga_io.h index 20c8665..f2f8863 100644 --- a/fpga_io.h +++ b/fpga_io.h @@ -14,7 +14,7 @@ int fpga_io_init(); void fpga_gpo_write(uint32_t value); uint32_t fpga_gpo_read(); -uint32_t fpga_gpi_read(); +int fpga_gpi_read(); void fpga_set_led(uint32_t on); int fpga_get_buttons();