8#define FORCE_INLINE __forceinline
9#elif defined(__clang__)
10#define FORCE_INLINE inline __attribute__((always_inline))
11#pragma clang diagnostic ignored "-Wduplicate-decl-specifier"
12#elif defined(__GNUC__)
13#define FORCE_INLINE inline __attribute__((always_inline))
15#error unknown compiler
25#define DMA_BUFFER_MEM_SECTION __attribute__((section(".sram1_bss")))
31#define DTCM_MEM_SECTION __attribute__((section(".dtcmram_bss")))
33#define FBIPMAX 0.999985f
34#define FBIPMIN (-FBIPMAX)
35#define U82F_SCALE 0.0078740f
36#define F2U8_SCALE 127.0f
37#define S82F_SCALE 0.0078125f
38#define F2S8_SCALE 127.0f
39#define S162F_SCALE 3.0517578125e-05f
40#define F2S16_SCALE 32767.0f
41#define F2S24_SCALE 8388608.0f
42#define S242F_SCALE 1.192092896e-07f
43#define S24SIGN 0x800000
44#define S322F_SCALE 4.6566129e-10f
45#define F2S32_SCALE 2147483647.f
69FORCE_INLINE
float cube(
float x)
79FORCE_INLINE
float u82f(uint8_t x)
87FORCE_INLINE uint8_t
f2u8(
float x)
100FORCE_INLINE
float s82f(int8_t x)
108FORCE_INLINE int8_t
f2s8(
float x)
255[[deprecated(
"Use daisy::Pin instead")]]
typedef struct
260 constexpr operator Pin()
const
#define F2S32_SCALE
Definition daisy_core.h:45
FORCE_INLINE float u82f(uint8_t x)
Definition daisy_core.h:79
FORCE_INLINE float s82f(int8_t x)
Definition daisy_core.h:100
FORCE_INLINE int16_t f2s16(float x)
Definition daisy_core.h:128
#define F2S16_SCALE
Definition daisy_core.h:40
#define S242F_SCALE
Definition daisy_core.h:42
#define S24SIGN
Definition daisy_core.h:43
FORCE_INLINE float s162f(int16_t x)
Definition daisy_core.h:120
FORCE_INLINE float cube(float x)
Definition daisy_core.h:69
#define F2S24_SCALE
Definition daisy_core.h:41
FORCE_INLINE float s322f(int32_t x)
Definition daisy_core.h:156
FORCE_INLINE int32_t f2s32(float x)
Definition daisy_core.h:163
FORCE_INLINE int8_t f2s8(float x)
Definition daisy_core.h:108
#define F2U8_SCALE
Definition daisy_core.h:36
#define FBIPMAX
Definition daisy_core.h:33
#define FBIPMIN
Definition daisy_core.h:34
FORCE_INLINE uint8_t f2u8(float x)
Definition daisy_core.h:87
#define F2S8_SCALE
Definition daisy_core.h:38
#define S322F_SCALE
Definition daisy_core.h:44
#define S162F_SCALE
Definition daisy_core.h:39
#define U82F_SCALE
Definition daisy_core.h:35
#define S82F_SCALE
Definition daisy_core.h:37
FORCE_INLINE int32_t f2s24(float x)
Definition daisy_core.h:146
FORCE_INLINE float s242f(int32_t x)
Definition daisy_core.h:138
Hardware defines and helpers for daisy field platform.
Definition index.h:2
GPIOPort
GPIO Port names.
Definition daisy_core.h:176
@ PORTX
Definition daisy_core.h:188
@ PORTH
Definition daisy_core.h:184
@ PORTE
Definition daisy_core.h:181
@ PORTJ
Definition daisy_core.h:186
@ PORTK
Definition daisy_core.h:187
@ PORTA
Definition daisy_core.h:177
@ PORTF
Definition daisy_core.h:182
@ PORTB
Definition daisy_core.h:178
@ PORTI
Definition daisy_core.h:185
@ PORTC
Definition daisy_core.h:179
@ PORTD
Definition daisy_core.h:180
@ PORTG
Definition daisy_core.h:183
dsy_gpio_port
Definition daisy_core.h:232
@ DSY_GPIOG
Definition daisy_core.h:239
@ DSY_GPIOF
Definition daisy_core.h:238
@ DSY_GPIOB
Definition daisy_core.h:234
@ DSY_GPIOK
Definition daisy_core.h:243
@ DSY_GPIO_LAST
Definition daisy_core.h:245
@ DSY_GPIOH
Definition daisy_core.h:240
@ DSY_GPIOJ
Definition daisy_core.h:242
@ DSY_GPIOE
Definition daisy_core.h:237
@ DSY_GPIOX
Definition daisy_core.h:244
@ DSY_GPIOC
Definition daisy_core.h:235
@ DSY_GPIOI
Definition daisy_core.h:241
@ DSY_GPIOD
Definition daisy_core.h:236
@ DSY_GPIOA
Definition daisy_core.h:233
representation of hardware port/pin combination
Definition daisy_core.h:193
GPIOPort port
Definition daisy_core.h:194
constexpr Pin()
Basic Constructor creates an invalid Pin object.
Definition daisy_core.h:204
constexpr bool operator!=(const Pin &rhs) const
comparison operator for checking inequality between Pin objects
Definition daisy_core.h:218
constexpr bool operator==(const Pin &rhs) const
comparison operator for checking equality between Pin objects
Definition daisy_core.h:212
uint8_t pin
Definition daisy_core.h:195
constexpr bool IsValid() const
checks validity of a Pin
Definition daisy_core.h:209
constexpr Pin(const GPIOPort pt, const uint8_t pn)
Constructor creates a valid pin.
Definition daisy_core.h:201
uint8_t pin
Definition daisy_core.h:258
dsy_gpio_port port
Definition daisy_core.h:257