FastLED 3.9.8
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include <stdint.h>
7#include "fl/namespace.h"
8
10
13
32
36typedef uint8_t fract8;
37
41typedef int8_t sfract7;
42
46typedef uint16_t fract16;
47
48typedef int32_t sfract31;
49
50typedef uint32_t fract32;
51
55typedef int16_t sfract15;
56
57
58typedef uint16_t accum88;
59typedef int16_t saccum78;
60typedef uint32_t accum1616;
61typedef int32_t saccum1516;
62typedef uint16_t accum124;
63typedef int32_t saccum114;
64
65
68typedef union {
69 uint32_t i;
70 float f;
71 struct {
72 uint32_t mantissa: 23;
73 uint32_t exponent: 8;
74 uint32_t signbit: 1;
75 };
76 struct {
77 uint32_t mant7 : 7;
78 uint32_t mant16: 16;
79 uint32_t exp_ : 8;
80 uint32_t sb_ : 1;
81 };
82 struct {
83 uint32_t mant_lo8 : 8;
84 uint32_t mant_hi16_exp_lo1 : 16;
85 uint32_t sb_exphi7 : 8;
86 };
88
91
int16_t sfract15
ANSI: signed _Fract.
Definition types.h:55
uint16_t accum88
ANSI: unsigned short _Accum. 8 bits int, 8 bits fraction.
Definition types.h:58
uint8_t fract8
ANSI: unsigned short _Fract.
Definition types.h:36
uint16_t accum124
no direct ANSI counterpart. 12 bits int, 4 bits fraction
Definition types.h:62
int8_t sfract7
ANSI: signed short _Fract.
Definition types.h:41
int16_t saccum78
ANSI: signed short _Accum. 7 bits int, 8 bits fraction.
Definition types.h:59
int32_t saccum114
no direct ANSI counterpart. 1 bit int, 14 bits fraction
Definition types.h:63
int32_t sfract31
ANSI: signed long _Fract. 31 bits int, 1 bit fraction.
Definition types.h:48
uint16_t fract16
ANSI: unsigned _Fract.
Definition types.h:46
int32_t saccum1516
ANSI: signed _Accum. 15 bits int, 16 bits fraction.
Definition types.h:61
uint32_t accum1616
ANSI: signed _Accum. 16 bits int, 16 bits fraction.
Definition types.h:60
uint32_t fract32
ANSI: unsigned long _Fract. 32 bits int, 32 bits fraction.
Definition types.h:50
Implements the FastLED namespace macros.
#define FASTLED_NAMESPACE_END
End of the FastLED namespace.
Definition namespace.h:16
#define FASTLED_NAMESPACE_BEGIN
Start of the FastLED namespace.
Definition namespace.h:14
typedef for IEEE754 "binary32" float type internals
Definition types.h:68
uint32_t mantissa
23-bit mantissa
Definition types.h:72
uint32_t signbit
sign bit
Definition types.h:74
uint32_t mant_lo8
Definition types.h:83
uint32_t mant16
Definition types.h:78
uint32_t mant_hi16_exp_lo1
Definition types.h:84
uint32_t i
raw value, as an integer
Definition types.h:69
float f
raw value, as a float
Definition types.h:70
uint32_t exponent
8-bit exponent
Definition types.h:73
uint32_t sb_exphi7
Definition types.h:85
uint32_t mant7
Definition types.h:77
uint32_t exp_
Definition types.h:79
uint32_t sb_
Definition types.h:80