summaryrefslogtreecommitdiffstats
path: root/app/ubx.h
diff options
context:
space:
mode:
Diffstat (limited to 'app/ubx.h')
-rw-r--r--app/ubx.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/ubx.h b/app/ubx.h
index 44c4782..4874e92 100644
--- a/app/ubx.h
+++ b/app/ubx.h
@@ -6,6 +6,14 @@ ubx_get_u8 (uint8_t *ptr, uint8_t *v)
}
static inline int
+ubx_get_i8 (uint8_t *ptr, int8_t *v)
+{
+ *v = (int8_t) * ptr;
+ return 1;
+}
+
+
+static inline int
ubx_get_u16 (uint8_t *ptr, uint16_t *v)
{
memcpy (v, ptr, sizeof (*v));