FastLED 3.9.3
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
42typedef int32_t sfract31;
43
44typedef uint32_t fract32;
45
49typedef int16_t sfract15;
50
51
52typedef uint16_t accum88;
53typedef int16_t saccum78;
54typedef uint32_t accum1616;
55typedef int32_t saccum1516;
56typedef uint16_t accum124;
57typedef int32_t saccum114;
58
59
62typedef union {
63 uint32_t i;
64 float f;
65 struct {
66 uint32_t mantissa: 23;
67 uint32_t exponent: 8;
68 uint32_t signbit: 1;
69 };
70 struct {
71 uint32_t mant7 : 7;
72 uint32_t mant16: 16;
73 uint32_t exp_ : 8;
74 uint32_t sb_ : 1;
75 };
76 struct {
77 uint32_t mant_lo8 : 8;
78 uint32_t mant_hi16_exp_lo1 : 16;
79 uint32_t sb_exphi7 : 8;
80 };
82
84
85FASTLED_NAMESPACE_END
int16_t sfract15
ANSI: signed _Fract.
Definition types.h:49
uint16_t accum88
ANSI: unsigned short _Accum. 8 bits int, 8 bits fraction.
Definition types.h:52
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:56
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:53
int32_t saccum114
no direct ANSI counterpart. 1 bit int, 14 bits fraction
Definition types.h:57
int32_t sfract31
ANSI: signed long _Fract. 31 bits int, 1 bit fraction.
Definition types.h:42
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:55
uint32_t accum1616
ANSI: signed _Accum. 16 bits int, 16 bits fraction.
Definition types.h:54
uint32_t fract32
ANSI: unsigned long _Fract. 32 bits int, 32 bits fraction.
Definition types.h:44
typedef for IEEE754 "binary32" float type internals
Definition types.h:62
uint32_t mantissa
23-bit mantissa
Definition types.h:66
uint32_t signbit
sign bit
Definition types.h:68
uint32_t mant_lo8
Definition types.h:77
uint32_t mant16
Definition types.h:72
uint32_t mant_hi16_exp_lo1
Definition types.h:78
uint32_t i
raw value, as an integer
Definition types.h:63
float f
raw value, as a float
Definition types.h:64
uint32_t exponent
8-bit exponent
Definition types.h:67
uint32_t sb_exphi7
Definition types.h:79
uint32_t mant7
Definition types.h:71
uint32_t exp_
Definition types.h:73
uint32_t sb_
Definition types.h:74