From 6d3a824e1cdae6e28146b7de380724b49488f3c2 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 25 Feb 2021 19:12:38 +0000 Subject: tim --- app/ubx.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'app/ubx.h') diff --git a/app/ubx.h b/app/ubx.h index 4874e92..87b7c0c 100644 --- a/app/ubx.h +++ b/app/ubx.h @@ -35,6 +35,13 @@ ubx_get_i32 (uint8_t *ptr, int32_t *v) } +static inline int +ubx_put_i8 (uint8_t *ptr, int8_t v) +{ + memcpy (ptr, &v, sizeof (v)); + return sizeof (v); +} + static inline int ubx_put_u8 (uint8_t *ptr, uint8_t v) { @@ -42,6 +49,14 @@ ubx_put_u8 (uint8_t *ptr, uint8_t v) return sizeof (v); } +static inline int +ubx_put_i16 (uint8_t *ptr, int16_t v) +{ + memcpy (ptr, &v, sizeof (v)); + return sizeof (v); +} + + static inline int ubx_put_u16 (uint8_t *ptr, uint16_t v) { -- cgit v1.2.3