fplayer
C99 Falcon Sequence (fseq) file player for Light-O-Rama hardware (like xLights)
Loading...
Searching...
No Matches
enc.h File Reference

Binary encoding utility functions. More...

#include <stdint.h>
Include dependency graph for enc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define enc_uint8_le(b, v)
 Encodes a "little-endian" 8-bit unsigned integer into a byte array. This macro is provided for consistency when used with other encoding functions provided by the header.
 

Functions

void enc_uint16_le (uint8_t *b, uint16_t v)
 Encodes a little-endian 16-bit unsigned integer into a byte array.
 
void enc_uint32_le (uint8_t *b, uint32_t v)
 Encodes a little-endian 32-bit unsigned integer into a byte array.
 
void enc_uint64_le (uint8_t *b, uint64_t v)
 Encodes a little-endian 64-bit unsigned integer into a byte array.
 

Detailed Description

Binary encoding utility functions.

Macro Definition Documentation

◆ enc_uint8_le

#define enc_uint8_le ( b,
v )
Value:
((b)[0] = (v))

Encodes a "little-endian" 8-bit unsigned integer into a byte array. This macro is provided for consistency when used with other encoding functions provided by the header.

Note
This macro is equivalent to b[0] = v.
Parameters
bbyte array to encode into
vvalue to encode

Function Documentation

◆ enc_uint16_le()

void enc_uint16_le ( uint8_t * b,
uint16_t v )

Encodes a little-endian 16-bit unsigned integer into a byte array.

Parameters
bbyte array to encode into
vvalue to encode
Here is the caller graph for this function:

◆ enc_uint32_le()

void enc_uint32_le ( uint8_t * b,
uint32_t v )

Encodes a little-endian 32-bit unsigned integer into a byte array.

Parameters
bbyte array to encode into
vvalue to encode
Here is the caller graph for this function:

◆ enc_uint64_le()

void enc_uint64_le ( uint8_t * b,
uint64_t v )

Encodes a little-endian 64-bit unsigned integer into a byte array.

Parameters
bbyte array to encode into
vvalue to encode
Here is the caller graph for this function: