FastLED 3.7.8
Loading...
Searching...
No Matches
types.h
1#pragma once
2
3#include <stdint.h>
4#include "namespace.h"
5
6FASTLED_NAMESPACE_BEGIN
7
26
30typedef uint8_t fract8;
31
35typedef int8_t sfract7;
36
40typedef uint16_t fract16;
41
45typedef int16_t sfract15;
46
47
48typedef uint16_t accum88;
49typedef int16_t saccum78;
50typedef uint32_t accum1616;
51typedef int32_t saccum1516;
52typedef uint16_t accum124;
53typedef int32_t saccum114;
54
55
58typedef union {
59 uint32_t i;
60 float f;
61 struct {
62 uint32_t mantissa: 23;
63 uint32_t exponent: 8;
64 uint32_t signbit: 1;
65 };
66 struct {
67 uint32_t mant7 : 7;
68 uint32_t mant16: 16;
69 uint32_t exp_ : 8;
70 uint32_t sb_ : 1;
71 };
72 struct {
73 uint32_t mant_lo8 : 8;
74 uint32_t mant_hi16_exp_lo1 : 16;
75 uint32_t sb_exphi7 : 8;
76 };
78
80
81FASTLED_NAMESPACE_END
int16_t sfract15
ANSI: signed _Fract.
Definition types.h:45
uint16_t accum88
ANSI: unsigned short _Accum. 8 bits int, 8 bits fraction.
Definition types.h:48
uint8_t fract8
ANSI: unsigned short _Fract.
Definition types.h:30
uint16_t accum124
no direct ANSI counterpart. 12 bits int, 4 bits fraction
Definition types.h:52
int8_t sfract7
ANSI: signed short _Fract.
Definition types.h:35
int16_t saccum78
ANSI: signed short _Accum. 7 bits int, 8 bits fraction.
Definition types.h:49
int32_t saccum114
no direct ANSI counterpart. 1 bit int, 14 bits fraction
Definition types.h:53
uint16_t fract16
ANSI: unsigned _Fract.
Definition types.h:40
int32_t saccum1516
ANSI: signed _Accum. 15 bits int, 16 bits fraction.
Definition types.h:51
uint32_t accum1616
ANSI: signed _Accum. 16 bits int, 16 bits fraction.
Definition types.h:50
typedef for IEEE754 "binary32" float type internals
Definition types.h:58
uint32_t mantissa
23-bit mantissa
Definition types.h:62
uint32_t signbit
sign bit
Definition types.h:64
uint32_t mant_lo8
Definition types.h:73
uint32_t mant16
Definition types.h:68
uint32_t mant_hi16_exp_lo1
Definition types.h:74
uint32_t i
raw value, as an integer
Definition types.h:59
float f
raw value, as a float
Definition types.h:60
uint32_t exponent
8-bit exponent
Definition types.h:63
uint32_t sb_exphi7
Definition types.h:75
uint32_t mant7
Definition types.h:67
uint32_t exp_
Definition types.h:69
uint32_t sb_
Definition types.h:70