Pebble App Framework
v4.6.0
How It Works
CLI
Device API
Phone API
C Coverage
TS Coverage
GitHub
Theme
Pebble App Framework: Device API
Toggle main menu visibility
Loading...
Searching...
No Matches
bytes_le.h
Go to the documentation of this file.
1
12
#pragma once
13
#include <stdint.h>
14
19
26
static
inline
int16_t
read_i16_le
(
const
uint8_t *p)
27
{
28
return
(int16_t)(p[0] | (p[1] << 8));
29
}
30
37
static
inline
int32_t
read_i32_le
(
const
uint8_t *p)
38
{
39
return
(int32_t)((uint32_t)p[0] | ((uint32_t)p[1] << 8) | ((uint32_t)p[2] << 16) | ((uint32_t)p[3] << 24));
40
}
41
read_i16_le
static int16_t read_i16_le(const uint8_t *p)
Reads a little-endian signed 16-bit value out of a byte pair.
Definition
bytes_le.h:26
read_i32_le
static int32_t read_i32_le(const uint8_t *p)
Reads a little-endian signed 32-bit value out of four bytes.
Definition
bytes_le.h:37
src
c
core
io
bytes_le.h
Generated by
1.18.0