aboutsummaryrefslogtreecommitdiff
path: root/tests/test-rpc_get_version.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2016-03-21 22:35:48 -0400
committerPaul Selkirk <paul@psgd.org>2016-03-21 22:37:53 -0400
commitcdaf07d30bd440cf3ee2f6615d044634734047bd (patch)
tree6086334b65da625dc782074064543c891dec1bfa /tests/test-rpc_get_version.c
parent46793833737e925af47e57d99bd037226d1cb2c4 (diff)
stupid fixes
Diffstat (limited to 'tests/test-rpc_get_version.c')
-rw-r--r--tests/test-rpc_get_version.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test-rpc_get_version.c b/tests/test-rpc_get_version.c
new file mode 100644
index 0000000..84869c3
--- /dev/null
+++ b/tests/test-rpc_get_version.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <assert.h>
+
+#include <hal.h>
+#include <hal_internal.h>
+
+int main (int argc, char *argv[])
+{
+ uint32_t version;
+
+#define check(op) { hal_error_t err; if ((err = (op)) != HAL_OK) { printf("%s: %s\n", #op, hal_error_string(err)); return 1; } }
+
+ check(hal_rpc_client_init());
+ check(hal_rpc_get_version(&version));
+ printf("%08x\n", version);
+
+ return 0;
+}