From 30ed93d67c5634ef27d9f286aa7e9d8b84715d2a Mon Sep 17 00:00:00 2001
From: donker <donker@astron.nl>
Date: Wed, 22 Nov 2023 08:58:13 +0100
Subject: [PATCH] changed ucp type

---
 src/fpga_map.cpp    |  2 +-
 src/periph/fpga.cpp |  2 +-
 src/periph/fpga.h   | 12 ++++++------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/fpga_map.cpp b/src/fpga_map.cpp
index 17df8cb9..923c9eb7 100644
--- a/src/fpga_map.cpp
+++ b/src/fpga_map.cpp
@@ -66,7 +66,7 @@ FpgaMap::FpgaMap()
     //                      opc-ua name,                                        intern cmdID,                                       n_nodes, n_data, permision, data_format
     pointMap->add_register("FPGA_ucp_block_comm_R",                             UCP_BLOCK,                              nFpgas, 1, "RO", REG_FORMAT_BOOLEAN);
     pointMap->add_register("FPGA_ucp_block_comm_RW",                            UCP_BLOCK,                              nFpgas, 1, "RW", REG_FORMAT_BOOLEAN);
-    pointMap->add_register("FPGA_ucp_status_R",                                 UCP_STATUS,                             nFpgas, 6, "RO", REG_FORMAT_INT64);
+    pointMap->add_register("FPGA_ucp_status_R",                                 UCP_STATUS,                             nFpgas, 6, "RO", REG_FORMAT_UINT64);
     pointMap->add_register("FPGA_ucp_status_reset_WO",                          UCP_STATUS,                             nFpgas, 1, "WO", REG_FORMAT_BOOLEAN);
     pointMap->add_register("FPGA_temp_R",                                       TEMP,                                   nFpgas, 1, "RO", REG_FORMAT_DOUBLE);
     pointMap->add_register("FPGA_firmware_version_R",                           FIRMWARE_VERSION,                       nFpgas, 1, "RO", REG_FORMAT_STRING);
diff --git a/src/periph/fpga.cpp b/src/periph/fpga.cpp
index 1adb4bc5..7361c31b 100644
--- a/src/periph/fpga.cpp
+++ b/src/periph/fpga.cpp
@@ -1557,7 +1557,7 @@ bool Periph_fpga::write_ucp_block(const char *data)
 bool Periph_fpga::read_ucp_status(char *data)
 {
     bool retval = true;
-    int64_t *_ptr = (int64_t *)data;
+    uint64_t *_ptr = (uint64_t *)data;
     *_ptr = ucp_reads;
     _ptr++;
     *_ptr = ucp_read_retries;
diff --git a/src/periph/fpga.h b/src/periph/fpga.h
index 1f71f9af..5588bea7 100644
--- a/src/periph/fpga.h
+++ b/src/periph/fpga.h
@@ -227,12 +227,12 @@ private:
     bool Online;
 
     bool ucp_block_comm;
-    int64_t ucp_reads;
-    int64_t ucp_read_retries;
-    int64_t ucp_read_fails;
-    int64_t ucp_writes;
-    int64_t ucp_write_retries;
-    int64_t ucp_write_fails;
+    uint64_t ucp_reads;
+    uint64_t ucp_read_retries;
+    uint64_t ucp_read_fails;
+    uint64_t ucp_writes;
+    uint64_t ucp_write_retries;
+    uint64_t ucp_write_fails;
 
     std::string current_design_name;
     uint32_t current_hw_version;
-- 
GitLab