diff options
author | fishsoupisgood <github@madingley.org> | 2019-05-04 12:37:04 +0100 |
---|---|---|
committer | fishsoupisgood <github@madingley.org> | 2019-05-04 12:39:08 +0100 |
commit | 74e577ac110513669a6d677842ceca4c5b1252ca (patch) | |
tree | cfe45c037717a740fa2fa6b1c99aa66814047055 /app/ubx.h | |
parent | 1b0a5f886412f0a292ec2b198e65760e3a1f45a1 (diff) | |
download | clock-74e577ac110513669a6d677842ceca4c5b1252ca.tar.gz clock-74e577ac110513669a6d677842ceca4c5b1252ca.tar.bz2 clock-74e577ac110513669a6d677842ceca4c5b1252ca.zip |
cut #1
Diffstat (limited to 'app/ubx.h')
-rw-r--r-- | app/ubx.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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)); |