From 535aaf00f6e4baf67917510bbbdcf5fc845dc741 Mon Sep 17 00:00:00 2001 From: Florian Pose <fp@igh-essen.com> Date: Thu, 9 Apr 2009 14:56:23 +0000 Subject: [PATCH] Added 64-bit types to reg_write. --- tool/CommandRegWrite.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tool/CommandRegWrite.cpp b/tool/CommandRegWrite.cpp index 4c8710b6..31484ca3 100644 --- a/tool/CommandRegWrite.cpp +++ b/tool/CommandRegWrite.cpp @@ -146,6 +146,10 @@ void CommandRegWrite::execute(MasterDevice &m, const StringVector &args) int32_t val; strValue >> val; *(int32_t *) data.data = cpu_to_le32(val); + } else if (dataType->name == "int64") { + int64_t val; + strValue >> val; + *(int64_t *) data.data = cpu_to_le64(val); } else if (dataType->name == "uint8") { uint16_t val; // uint8_t is interpreted as char strValue >> val; @@ -160,6 +164,10 @@ void CommandRegWrite::execute(MasterDevice &m, const StringVector &args) uint32_t val; strValue >> val; *(uint32_t *) data.data = cpu_to_le32(val); + } else if (dataType->name == "uint64") { + uint64_t val; + strValue >> val; + *(uint64_t *) data.data = cpu_to_le64(val); } else if (dataType->name == "string" || dataType->name == "octet_string") { data.length = strValue.str().size(); -- GitLab