Lydia - Printhead
Loading...
Searching...
No Matches
macros.h File Reference
#include "./types.h"

Go to the source code of this file.

Macros

#define __BV(b)   (1 << (b))
 
#define __DO_N(W, C, N, V...)   _DO_##N(W, C, V)
 
#define __DO_N(W, C, N, V...)   _DO_##N(W, C, V)
 
#define _ARRAY_N(N, ...)   ARRAY_##N(__VA_ARGS__)
 
#define _BOOL(x)   NOT(NOT(x))
 
#define _BV32(b)   (1UL << (b))
 
#define _CAT(a, V...)   a##V
 
#define _DIS_1(O)   NOT(_ENA_1(O))
 
#define _DO_1(W, C, A)   (_##W##_1(A))
 
#define _DO_1(W, C, A)   (_##W##_1(A))
 
#define _DO_10(W, C, A, V...)   (_##W##_1(A) C _DO_9(W, C, V))
 
#define _DO_10(W, C, A, V...)   (_##W##_1(A) C _DO_9(W, C, V))
 
#define _DO_11(W, C, A, V...)   (_##W##_1(A) C _DO_10(W, C, V))
 
#define _DO_11(W, C, A, V...)   (_##W##_1(A) C _DO_10(W, C, V))
 
#define _DO_12(W, C, A, V...)   (_##W##_1(A) C _DO_11(W, C, V))
 
#define _DO_12(W, C, A, V...)   (_##W##_1(A) C _DO_11(W, C, V))
 
#define _DO_13(W, C, A, V...)   (_##W##_1(A) C _DO_12(W, C, V))
 
#define _DO_13(W, C, A, V...)   (_##W##_1(A) C _DO_12(W, C, V))
 
#define _DO_14(W, C, A, V...)   (_##W##_1(A) C _DO_13(W, C, V))
 
#define _DO_14(W, C, A, V...)   (_##W##_1(A) C _DO_13(W, C, V))
 
#define _DO_15(W, C, A, V...)   (_##W##_1(A) C _DO_14(W, C, V))
 
#define _DO_15(W, C, A, V...)   (_##W##_1(A) C _DO_14(W, C, V))
 
#define _DO_16(W, C, A, V...)   (_##W##_1(A) C _DO_15(W, C, V))
 
#define _DO_16(W, C, A, V...)   (_##W##_1(A) C _DO_15(W, C, V))
 
#define _DO_17(W, C, A, V...)   (_##W##_1(A) C _DO_16(W, C, V))
 
#define _DO_17(W, C, A, V...)   (_##W##_1(A) C _DO_16(W, C, V))
 
#define _DO_18(W, C, A, V...)   (_##W##_1(A) C _DO_17(W, C, V))
 
#define _DO_18(W, C, A, V...)   (_##W##_1(A) C _DO_17(W, C, V))
 
#define _DO_19(W, C, A, V...)   (_##W##_1(A) C _DO_18(W, C, V))
 
#define _DO_19(W, C, A, V...)   (_##W##_1(A) C _DO_18(W, C, V))
 
#define _DO_2(W, C, A, B)   (_##W##_1(A) C _##W##_1(B))
 
#define _DO_2(W, C, A, B)   (_##W##_1(A) C _##W##_1(B))
 
#define _DO_20(W, C, A, V...)   (_##W##_1(A) C _DO_19(W, C, V))
 
#define _DO_20(W, C, A, V...)   (_##W##_1(A) C _DO_19(W, C, V))
 
#define _DO_21(W, C, A, V...)   (_##W##_1(A) C _DO_20(W, C, V))
 
#define _DO_21(W, C, A, V...)   (_##W##_1(A) C _DO_20(W, C, V))
 
#define _DO_22(W, C, A, V...)   (_##W##_1(A) C _DO_21(W, C, V))
 
#define _DO_22(W, C, A, V...)   (_##W##_1(A) C _DO_21(W, C, V))
 
#define _DO_23(W, C, A, V...)   (_##W##_1(A) C _DO_22(W, C, V))
 
#define _DO_23(W, C, A, V...)   (_##W##_1(A) C _DO_22(W, C, V))
 
#define _DO_24(W, C, A, V...)   (_##W##_1(A) C _DO_23(W, C, V))
 
#define _DO_24(W, C, A, V...)   (_##W##_1(A) C _DO_23(W, C, V))
 
#define _DO_25(W, C, A, V...)   (_##W##_1(A) C _DO_24(W, C, V))
 
#define _DO_25(W, C, A, V...)   (_##W##_1(A) C _DO_24(W, C, V))
 
#define _DO_26(W, C, A, V...)   (_##W##_1(A) C _DO_25(W, C, V))
 
#define _DO_26(W, C, A, V...)   (_##W##_1(A) C _DO_25(W, C, V))
 
#define _DO_27(W, C, A, V...)   (_##W##_1(A) C _DO_26(W, C, V))
 
#define _DO_27(W, C, A, V...)   (_##W##_1(A) C _DO_26(W, C, V))
 
#define _DO_28(W, C, A, V...)   (_##W##_1(A) C _DO_27(W, C, V))
 
#define _DO_28(W, C, A, V...)   (_##W##_1(A) C _DO_27(W, C, V))
 
#define _DO_29(W, C, A, V...)   (_##W##_1(A) C _DO_28(W, C, V))
 
#define _DO_29(W, C, A, V...)   (_##W##_1(A) C _DO_28(W, C, V))
 
#define _DO_3(W, C, A, V...)   (_##W##_1(A) C _DO_2(W, C, V))
 
#define _DO_3(W, C, A, V...)   (_##W##_1(A) C _DO_2(W, C, V))
 
#define _DO_30(W, C, A, V...)   (_##W##_1(A) C _DO_29(W, C, V))
 
#define _DO_30(W, C, A, V...)   (_##W##_1(A) C _DO_29(W, C, V))
 
#define _DO_31(W, C, A, V...)   (_##W##_1(A) C _DO_30(W, C, V))
 
#define _DO_31(W, C, A, V...)   (_##W##_1(A) C _DO_30(W, C, V))
 
#define _DO_32(W, C, A, V...)   (_##W##_1(A) C _DO_31(W, C, V))
 
#define _DO_32(W, C, A, V...)   (_##W##_1(A) C _DO_31(W, C, V))
 
#define _DO_33(W, C, A, V...)   (_##W##_1(A) C _DO_32(W, C, V))
 
#define _DO_33(W, C, A, V...)   (_##W##_1(A) C _DO_32(W, C, V))
 
#define _DO_34(W, C, A, V...)   (_##W##_1(A) C _DO_33(W, C, V))
 
#define _DO_34(W, C, A, V...)   (_##W##_1(A) C _DO_33(W, C, V))
 
#define _DO_35(W, C, A, V...)   (_##W##_1(A) C _DO_34(W, C, V))
 
#define _DO_35(W, C, A, V...)   (_##W##_1(A) C _DO_34(W, C, V))
 
#define _DO_36(W, C, A, V...)   (_##W##_1(A) C _DO_35(W, C, V))
 
#define _DO_36(W, C, A, V...)   (_##W##_1(A) C _DO_35(W, C, V))
 
#define _DO_37(W, C, A, V...)   (_##W##_1(A) C _DO_36(W, C, V))
 
#define _DO_37(W, C, A, V...)   (_##W##_1(A) C _DO_36(W, C, V))
 
#define _DO_38(W, C, A, V...)   (_##W##_1(A) C _DO_37(W, C, V))
 
#define _DO_38(W, C, A, V...)   (_##W##_1(A) C _DO_37(W, C, V))
 
#define _DO_39(W, C, A, V...)   (_##W##_1(A) C _DO_38(W, C, V))
 
#define _DO_39(W, C, A, V...)   (_##W##_1(A) C _DO_38(W, C, V))
 
#define _DO_4(W, C, A, V...)   (_##W##_1(A) C _DO_3(W, C, V))
 
#define _DO_4(W, C, A, V...)   (_##W##_1(A) C _DO_3(W, C, V))
 
#define _DO_40(W, C, A, V...)   (_##W##_1(A) C _DO_39(W, C, V))
 
#define _DO_40(W, C, A, V...)   (_##W##_1(A) C _DO_39(W, C, V))
 
#define _DO_5(W, C, A, V...)   (_##W##_1(A) C _DO_4(W, C, V))
 
#define _DO_5(W, C, A, V...)   (_##W##_1(A) C _DO_4(W, C, V))
 
#define _DO_6(W, C, A, V...)   (_##W##_1(A) C _DO_5(W, C, V))
 
#define _DO_6(W, C, A, V...)   (_##W##_1(A) C _DO_5(W, C, V))
 
#define _DO_7(W, C, A, V...)   (_##W##_1(A) C _DO_6(W, C, V))
 
#define _DO_7(W, C, A, V...)   (_##W##_1(A) C _DO_6(W, C, V))
 
#define _DO_8(W, C, A, V...)   (_##W##_1(A) C _DO_7(W, C, V))
 
#define _DO_8(W, C, A, V...)   (_##W##_1(A) C _DO_7(W, C, V))
 
#define _DO_9(W, C, A, V...)   (_##W##_1(A) C _DO_8(W, C, V))
 
#define _DO_9(W, C, A, V...)   (_##W##_1(A) C _DO_8(W, C, V))
 
#define _DO_N(W, C, N, V...)   __DO_N(W, C, N, V)
 
#define _DO_N(W, C, N, V...)   __DO_N(W, C, N, V)
 
#define _ENA_1(O)   _ISENA(CAT(_IS, CAT(ENA_, O)))
 
#define _IF_0(...)   _IF_0_ELSE
 
#define _IF_0_ELSE(V...)   V
 
#define _IF_1(V...)   V _IF_1_ELSE
 
#define _IF_1_ELSE(...)
 
#define _IF_ELSE(TF)   _CAT(_IF_, TF)
 
#define _ISENA(V...)   IS_PROBE(V)
 
#define _ISENA_   ~, 1
 
#define _ISENA_0x1   ~, 1
 
#define _ISENA_1   ~, 1
 
#define _ISENA_true   ~, 1
 
#define _NOT_0   PROBE()
 
#define _NUM_ARGS(_, n, m, l, k, j, i, h, g, f, e, d, c, b, a, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, OUT, ...)   OUT
 
#define _NUM_ARGS(_, n, m, l, k, j, i, h, g, f, e, d, c, b, a, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, OUT, ...)   OUT
 
#define _TWO_ARGS(_, n, m, l, k, j, i, h, g, f, e, d, c, b, a, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, OUT, ...)   OUT
 
#define _UNUSED   __attribute__((unused))
 
#define ALL   ENABLED
 
#define ANY(V...)   !DISABLED(V)
 
#define ARRAY_1(v1, ...)
 
#define ARRAY_2(v1, v2, ...)
 
#define ARRAY_3(v1, v2, v3, ...)
 
#define ARRAY_4(v1, v2, v3, v4, ...)
 
#define ARRAY_5(v1, v2, v3, v4, v5, ...)
 
#define ARRAY_6(v1, v2, v3, v4, v5, v6, ...)
 
#define ARRAY_N(N, ...)   _ARRAY_N(N, __VA_ARGS__)
 
#define C_STR(s)   (char *)s
 
#define CAT(a, V...)   _CAT(a, V)
 
#define CBI(n, b)   (n &= ~__BV(b))
 
#define CBI32(n, b)   (n &= ~_BV32(b))
 
#define CC_STR(s)   (const char *)s
 
#define CEILING(x, y)   (((x) + (y) - 1) / (y))
 
#define COPY(a, b)   memcpy(a, b, MIN(sizeof(a), sizeof(b)))
 
#define COUNT(a)   (sizeof(a) / sizeof(*a))
 
#define COUNT(a)   (sizeof(a) / sizeof(*a))
 
#define COUNT_ENABLED(V...)   DO(ENA, +, V)
 
#define CYCLES_PER_MICROSECOND   (F_CPU / 1000000UL)
 
#define DEC_1   0
 
#define DEC_2   1
 
#define DEC_3   2
 
#define DEC_4   3
 
#define DEC_5   4
 
#define DEC_6   5
 
#define DEC_7   6
 
#define DEC_8   7
 
#define DEC_9   8
 
#define DECIMAL(a)   (NUMERIC(a) || a == '.')
 
#define DECIMAL(a)   (NUMERIC(a) || a == '.')
 
#define DECIMAL_SIGNED(a)   (DECIMAL(a) || (a) == '-' || (a) == '+')
 
#define DECIMAL_SIGNED(a)   (DECIMAL(a) || (a) == '-' || (a) == '+')
 
#define DECREMENT(n)   DECREMENT_(n)
 
#define DECREMENT_(n)   DEC_##n
 
#define DEGREES(r)   ((r) * 180.0f / M_PI)
 
#define DISABLED(V...)   DO(DIS, &&, V)
 
#define DISABLED(V...)   DO(DIS, &&, V)
 
#define DO(W, C, V...)   (_DO_N(W, C, NUM_ARGS(V), V))
 
#define DO(W, C, V...)   (_DO_N(W, C, NUM_ARGS(V), V))
 
#define ELAPSED(NOW, SOON)   (!PENDING(NOW, SOON))
 
#define ENABLED(V...)   DO(ENA, &&, V)
 
#define ENABLED(V...)   DO(ENA, &&, V)
 
#define FIRST(a, ...)   a
 
#define FIXFLOAT(f)   ({__typeof__(f) _f = (f); _f + (_f < 0 ? -0.0000005f : 0.0000005f); })
 
#define FORCE_INLINE   __attribute__((always_inline)) inline
 
#define HEXCHR(a)
 
#define HOUR_MS   ((millis_t)1000 * (millis_t)(60 * 60))
 
#define IF_ELSE(TF)   _IF_ELSE(_BOOL(TF))
 
#define INC_0   1
 
#define INC_1   2
 
#define INC_2   3
 
#define INC_3   4
 
#define INC_4   5
 
#define INC_5   6
 
#define INC_6   7
 
#define INC_7   8
 
#define INC_8   9
 
#define INCREMENT(n)   INCREMENT_(n)
 
#define INCREMENT_(n)   INC_##n
 
#define IS_PROBE(V...)   SECOND(V, 0)
 
#define ISEOL(C)   ((C) == '\n' || (C) == '\r')
 
#define MANY(V...)   (COUNT_ENABLED(V) > 1)
 
#define MIN_MS   ((millis_t)1000 * (millis_t)(60))
 
#define MMM_TO_MMS(MM_M)   ((MM_M) / 60.0f)
 
#define MMS_TO_MMM(MM_S)   ((MM_S) * 60.0f)
 
#define NANOSECONDS_PER_CYCLE   (1000000000.0 / F_CPU)
 
#define NEAR(x, y)   NEAR_ZERO((x) - (y))
 
#define NEAR_ZERO(x)   WITHIN(x, -0.000001f, 0.000001f)
 
#define NONE   DISABLED
 
#define NOOP   (void(0))
 
#define NOT(x)   IS_PROBE(_CAT(_NOT_, x))
 
#define NUM_ARGS(V...)   _NUM_ARGS(0, V, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
 
#define NUM_ARGS(V...)   _NUM_ARGS(0, V, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
 
#define NUMERIC(a)   WITHIN(a, '0', '9')
 
#define NUMERIC(a)   WITHIN(a, '0', '9')
 
#define NUMERIC_SIGNED(a)   (NUMERIC(a) || (a) == '-' || (a) == '+')
 
#define NUMERIC_SIGNED(a)   (NUMERIC(a) || (a) == '-' || (a) == '+')
 
#define PENDING(NOW, SOON)   ((long)(NOW - (SOON)) < 0)
 
#define PROBE()   ~, 1
 
#define RADIANS(d)   ((d) * M_PI / 180.0f)
 
#define RECIPROCAL(x)   (NEAR_ZERO(x) ? 0 : (1 / float(x)))
 
#define SBI(n, b)   (n |= __BV(b))
 
#define SBI32(n, b)   (n |= _BV32(b))
 
#define SECOND(a, b, ...)   b
 
#define SECS   ((millis_t)1000)
 
#define SET_BIT_TO(N, B, TF)
 
#define SIGN(a)   ((a > 0) - (a < 0))
 
#define SPACE(A)   " " << A << " "
 
#define STRINGIFY(M)   STRINGIFY_(M)
 
#define STRINGIFY_(M)   #M
 
#define TEST(n, b)   !!((n) & __BV(b))
 
#define TEST32(n, b)   !!((n) & _BV32(b))
 
#define THIRD(a, b, c, ...)   c
 
#define TWO_ARGS(V...)   _TWO_ARGS(0, V, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0)
 
#define UNEAR_ZERO(x)   ((x) < 0.000001f)
 
#define WITHIN(N, L, H)   ((N) >= (L) && (N) <= (H))
 
#define WITHIN(V, L, H)   ((V) >= (L) && (V) <= (H))
 
#define ZERO(a)   memset(a, 0, sizeof(a))
 
#define ZERO(a)   memset((void *)a, 0, sizeof(a))
 

Macro Definition Documentation

◆ __BV

#define __BV ( b)    (1 << (b))

Definition at line 151 of file macros.h.

◆ __DO_N [1/2]

#define __DO_N ( W,
C,
N,
V... )   _DO_##N(W, C, V)

Definition at line 94 of file macros.h.

◆ __DO_N [2/2]

#define __DO_N ( W,
C,
N,
V... )   _DO_##N(W, C, V)

Definition at line 94 of file macros.h.

◆ _ARRAY_N

#define _ARRAY_N ( N,
... )   ARRAY_##N(__VA_ARGS__)

Definition at line 230 of file macros.h.

◆ _BOOL

#define _BOOL ( x)    NOT(NOT(x))

Definition at line 106 of file macros.h.

◆ _BV32

#define _BV32 ( b)    (1UL << (b))

Definition at line 164 of file macros.h.

◆ _CAT

#define _CAT ( a,
V... )   a##V

Definition at line 50 of file macros.h.

◆ _DIS_1

#define _DIS_1 ( O)    NOT(_ENA_1(O))

Definition at line 126 of file macros.h.

◆ _DO_1 [1/2]

#define _DO_1 ( W,
C,
A )   (_##W##_1(A))

Definition at line 54 of file macros.h.

◆ _DO_1 [2/2]

#define _DO_1 ( W,
C,
A )   (_##W##_1(A))

Definition at line 54 of file macros.h.

◆ _DO_10 [1/2]

#define _DO_10 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_9(W, C, V))

Definition at line 63 of file macros.h.

◆ _DO_10 [2/2]

#define _DO_10 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_9(W, C, V))

Definition at line 63 of file macros.h.

◆ _DO_11 [1/2]

#define _DO_11 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_10(W, C, V))

Definition at line 64 of file macros.h.

◆ _DO_11 [2/2]

#define _DO_11 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_10(W, C, V))

Definition at line 64 of file macros.h.

◆ _DO_12 [1/2]

#define _DO_12 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_11(W, C, V))

Definition at line 65 of file macros.h.

◆ _DO_12 [2/2]

#define _DO_12 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_11(W, C, V))

Definition at line 65 of file macros.h.

◆ _DO_13 [1/2]

#define _DO_13 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_12(W, C, V))

Definition at line 66 of file macros.h.

◆ _DO_13 [2/2]

#define _DO_13 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_12(W, C, V))

Definition at line 66 of file macros.h.

◆ _DO_14 [1/2]

#define _DO_14 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_13(W, C, V))

Definition at line 67 of file macros.h.

◆ _DO_14 [2/2]

#define _DO_14 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_13(W, C, V))

Definition at line 67 of file macros.h.

◆ _DO_15 [1/2]

#define _DO_15 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_14(W, C, V))

Definition at line 68 of file macros.h.

◆ _DO_15 [2/2]

#define _DO_15 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_14(W, C, V))

Definition at line 68 of file macros.h.

◆ _DO_16 [1/2]

#define _DO_16 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_15(W, C, V))

Definition at line 69 of file macros.h.

◆ _DO_16 [2/2]

#define _DO_16 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_15(W, C, V))

Definition at line 69 of file macros.h.

◆ _DO_17 [1/2]

#define _DO_17 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_16(W, C, V))

Definition at line 70 of file macros.h.

◆ _DO_17 [2/2]

#define _DO_17 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_16(W, C, V))

Definition at line 70 of file macros.h.

◆ _DO_18 [1/2]

#define _DO_18 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_17(W, C, V))

Definition at line 71 of file macros.h.

◆ _DO_18 [2/2]

#define _DO_18 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_17(W, C, V))

Definition at line 71 of file macros.h.

◆ _DO_19 [1/2]

#define _DO_19 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_18(W, C, V))

Definition at line 72 of file macros.h.

◆ _DO_19 [2/2]

#define _DO_19 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_18(W, C, V))

Definition at line 72 of file macros.h.

◆ _DO_2 [1/2]

#define _DO_2 ( W,
C,
A,
B )   (_##W##_1(A) C _##W##_1(B))

Definition at line 55 of file macros.h.

◆ _DO_2 [2/2]

#define _DO_2 ( W,
C,
A,
B )   (_##W##_1(A) C _##W##_1(B))

Definition at line 55 of file macros.h.

◆ _DO_20 [1/2]

#define _DO_20 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_19(W, C, V))

Definition at line 73 of file macros.h.

◆ _DO_20 [2/2]

#define _DO_20 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_19(W, C, V))

Definition at line 73 of file macros.h.

◆ _DO_21 [1/2]

#define _DO_21 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_20(W, C, V))

Definition at line 74 of file macros.h.

◆ _DO_21 [2/2]

#define _DO_21 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_20(W, C, V))

Definition at line 74 of file macros.h.

◆ _DO_22 [1/2]

#define _DO_22 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_21(W, C, V))

Definition at line 75 of file macros.h.

◆ _DO_22 [2/2]

#define _DO_22 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_21(W, C, V))

Definition at line 75 of file macros.h.

◆ _DO_23 [1/2]

#define _DO_23 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_22(W, C, V))

Definition at line 76 of file macros.h.

◆ _DO_23 [2/2]

#define _DO_23 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_22(W, C, V))

Definition at line 76 of file macros.h.

◆ _DO_24 [1/2]

#define _DO_24 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_23(W, C, V))

Definition at line 77 of file macros.h.

◆ _DO_24 [2/2]

#define _DO_24 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_23(W, C, V))

Definition at line 77 of file macros.h.

◆ _DO_25 [1/2]

#define _DO_25 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_24(W, C, V))

Definition at line 78 of file macros.h.

◆ _DO_25 [2/2]

#define _DO_25 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_24(W, C, V))

Definition at line 78 of file macros.h.

◆ _DO_26 [1/2]

#define _DO_26 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_25(W, C, V))

Definition at line 79 of file macros.h.

◆ _DO_26 [2/2]

#define _DO_26 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_25(W, C, V))

Definition at line 79 of file macros.h.

◆ _DO_27 [1/2]

#define _DO_27 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_26(W, C, V))

Definition at line 80 of file macros.h.

◆ _DO_27 [2/2]

#define _DO_27 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_26(W, C, V))

Definition at line 80 of file macros.h.

◆ _DO_28 [1/2]

#define _DO_28 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_27(W, C, V))

Definition at line 81 of file macros.h.

◆ _DO_28 [2/2]

#define _DO_28 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_27(W, C, V))

Definition at line 81 of file macros.h.

◆ _DO_29 [1/2]

#define _DO_29 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_28(W, C, V))

Definition at line 82 of file macros.h.

◆ _DO_29 [2/2]

#define _DO_29 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_28(W, C, V))

Definition at line 82 of file macros.h.

◆ _DO_3 [1/2]

#define _DO_3 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_2(W, C, V))

Definition at line 56 of file macros.h.

◆ _DO_3 [2/2]

#define _DO_3 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_2(W, C, V))

Definition at line 56 of file macros.h.

◆ _DO_30 [1/2]

#define _DO_30 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_29(W, C, V))

Definition at line 83 of file macros.h.

◆ _DO_30 [2/2]

#define _DO_30 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_29(W, C, V))

Definition at line 83 of file macros.h.

◆ _DO_31 [1/2]

#define _DO_31 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_30(W, C, V))

Definition at line 84 of file macros.h.

◆ _DO_31 [2/2]

#define _DO_31 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_30(W, C, V))

Definition at line 84 of file macros.h.

◆ _DO_32 [1/2]

#define _DO_32 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_31(W, C, V))

Definition at line 85 of file macros.h.

◆ _DO_32 [2/2]

#define _DO_32 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_31(W, C, V))

Definition at line 85 of file macros.h.

◆ _DO_33 [1/2]

#define _DO_33 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_32(W, C, V))

Definition at line 86 of file macros.h.

◆ _DO_33 [2/2]

#define _DO_33 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_32(W, C, V))

Definition at line 86 of file macros.h.

◆ _DO_34 [1/2]

#define _DO_34 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_33(W, C, V))

Definition at line 87 of file macros.h.

◆ _DO_34 [2/2]

#define _DO_34 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_33(W, C, V))

Definition at line 87 of file macros.h.

◆ _DO_35 [1/2]

#define _DO_35 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_34(W, C, V))

Definition at line 88 of file macros.h.

◆ _DO_35 [2/2]

#define _DO_35 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_34(W, C, V))

Definition at line 88 of file macros.h.

◆ _DO_36 [1/2]

#define _DO_36 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_35(W, C, V))

Definition at line 89 of file macros.h.

◆ _DO_36 [2/2]

#define _DO_36 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_35(W, C, V))

Definition at line 89 of file macros.h.

◆ _DO_37 [1/2]

#define _DO_37 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_36(W, C, V))

Definition at line 90 of file macros.h.

◆ _DO_37 [2/2]

#define _DO_37 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_36(W, C, V))

Definition at line 90 of file macros.h.

◆ _DO_38 [1/2]

#define _DO_38 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_37(W, C, V))

Definition at line 91 of file macros.h.

◆ _DO_38 [2/2]

#define _DO_38 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_37(W, C, V))

Definition at line 91 of file macros.h.

◆ _DO_39 [1/2]

#define _DO_39 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_38(W, C, V))

Definition at line 92 of file macros.h.

◆ _DO_39 [2/2]

#define _DO_39 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_38(W, C, V))

Definition at line 92 of file macros.h.

◆ _DO_4 [1/2]

#define _DO_4 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_3(W, C, V))

Definition at line 57 of file macros.h.

◆ _DO_4 [2/2]

#define _DO_4 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_3(W, C, V))

Definition at line 57 of file macros.h.

◆ _DO_40 [1/2]

#define _DO_40 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_39(W, C, V))

Definition at line 93 of file macros.h.

◆ _DO_40 [2/2]

#define _DO_40 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_39(W, C, V))

Definition at line 93 of file macros.h.

◆ _DO_5 [1/2]

#define _DO_5 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_4(W, C, V))

Definition at line 58 of file macros.h.

◆ _DO_5 [2/2]

#define _DO_5 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_4(W, C, V))

Definition at line 58 of file macros.h.

◆ _DO_6 [1/2]

#define _DO_6 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_5(W, C, V))

Definition at line 59 of file macros.h.

◆ _DO_6 [2/2]

#define _DO_6 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_5(W, C, V))

Definition at line 59 of file macros.h.

◆ _DO_7 [1/2]

#define _DO_7 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_6(W, C, V))

Definition at line 60 of file macros.h.

◆ _DO_7 [2/2]

#define _DO_7 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_6(W, C, V))

Definition at line 60 of file macros.h.

◆ _DO_8 [1/2]

#define _DO_8 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_7(W, C, V))

Definition at line 61 of file macros.h.

◆ _DO_8 [2/2]

#define _DO_8 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_7(W, C, V))

Definition at line 61 of file macros.h.

◆ _DO_9 [1/2]

#define _DO_9 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_8(W, C, V))

Definition at line 62 of file macros.h.

◆ _DO_9 [2/2]

#define _DO_9 ( W,
C,
A,
V... )   (_##W##_1(A) C _DO_8(W, C, V))

Definition at line 62 of file macros.h.

◆ _DO_N [1/2]

#define _DO_N ( W,
C,
N,
V... )   __DO_N(W, C, N, V)

Definition at line 95 of file macros.h.

◆ _DO_N [2/2]

#define _DO_N ( W,
C,
N,
V... )   __DO_N(W, C, N, V)

Definition at line 95 of file macros.h.

◆ _ENA_1

#define _ENA_1 ( O)    _ISENA(CAT(_IS, CAT(ENA_, O)))

Definition at line 125 of file macros.h.

◆ _IF_0

#define _IF_0 ( ...)    _IF_0_ELSE

Definition at line 112 of file macros.h.

◆ _IF_0_ELSE

#define _IF_0_ELSE ( V...)    V

Definition at line 115 of file macros.h.

◆ _IF_1

#define _IF_1 ( V...)    V _IF_1_ELSE

Definition at line 111 of file macros.h.

◆ _IF_1_ELSE

#define _IF_1_ELSE ( ...)

Definition at line 114 of file macros.h.

◆ _IF_ELSE

#define _IF_ELSE ( TF)    _CAT(_IF_, TF)

Definition at line 109 of file macros.h.

◆ _ISENA

#define _ISENA ( V...)    IS_PROBE(V)

Definition at line 122 of file macros.h.

◆ _ISENA_

#define _ISENA_   ~, 1

Definition at line 118 of file macros.h.

◆ _ISENA_0x1

#define _ISENA_0x1   ~, 1

Definition at line 120 of file macros.h.

◆ _ISENA_1

#define _ISENA_1   ~, 1

Definition at line 119 of file macros.h.

◆ _ISENA_true

#define _ISENA_true   ~, 1

Definition at line 121 of file macros.h.

◆ _NOT_0

#define _NOT_0   PROBE()

Definition at line 104 of file macros.h.

◆ _NUM_ARGS [1/2]

#define _NUM_ARGS ( _,
n,
m,
l,
k,
j,
i,
h,
g,
f,
e,
d,
c,
b,
a,
Z,
Y,
X,
W,
V,
U,
T,
S,
R,
Q,
P,
O,
N,
M,
L,
K,
J,
I,
H,
G,
F,
E,
D,
C,
B,
A,
OUT,
... )   OUT

Definition at line 42 of file macros.h.

◆ _NUM_ARGS [2/2]

#define _NUM_ARGS ( _,
n,
m,
l,
k,
j,
i,
h,
g,
f,
e,
d,
c,
b,
a,
Z,
Y,
X,
W,
V,
U,
T,
S,
R,
Q,
P,
O,
N,
M,
L,
K,
J,
I,
H,
G,
F,
E,
D,
C,
B,
A,
OUT,
... )   OUT

Definition at line 42 of file macros.h.

◆ _TWO_ARGS

#define _TWO_ARGS ( _,
n,
m,
l,
k,
j,
i,
h,
g,
f,
e,
d,
c,
b,
a,
Z,
Y,
X,
W,
V,
U,
T,
S,
R,
Q,
P,
O,
N,
M,
L,
K,
J,
I,
H,
G,
F,
E,
D,
C,
B,
A,
OUT,
... )   OUT

Definition at line 46 of file macros.h.

◆ _UNUSED

#define _UNUSED   __attribute__((unused))

Definition at line 34 of file macros.h.

◆ ALL

#define ALL   ENABLED

Definition at line 130 of file macros.h.

◆ ANY

#define ANY ( V...)    !DISABLED(V)

Definition at line 129 of file macros.h.

◆ ARRAY_1

#define ARRAY_1 ( v1,
... )
Value:
{ \
v1 \
}
Definition xtimer.h:21

Definition at line 225 of file macros.h.

225#define ARRAY_1(v1, ...) \
226 { \
227 v1 \
228 }

◆ ARRAY_2

#define ARRAY_2 ( v1,
v2,
... )
Value:
{ \
v1, v2 \
}

Definition at line 221 of file macros.h.

221#define ARRAY_2(v1, v2, ...) \
222 { \
223 v1, v2 \
224 }

◆ ARRAY_3

#define ARRAY_3 ( v1,
v2,
v3,
... )
Value:
{ \
v1, v2, v3 \
}

Definition at line 217 of file macros.h.

217#define ARRAY_3(v1, v2, v3, ...) \
218 { \
219 v1, v2, v3 \
220 }

◆ ARRAY_4

#define ARRAY_4 ( v1,
v2,
v3,
v4,
... )
Value:
{ \
v1, v2, v3, v4 \
}

Definition at line 213 of file macros.h.

213#define ARRAY_4(v1, v2, v3, v4, ...) \
214 { \
215 v1, v2, v3, v4 \
216 }

◆ ARRAY_5

#define ARRAY_5 ( v1,
v2,
v3,
v4,
v5,
... )
Value:
{ \
v1, v2, v3, v4, v5 \
}

Definition at line 209 of file macros.h.

209#define ARRAY_5(v1, v2, v3, v4, v5, ...) \
210 { \
211 v1, v2, v3, v4, v5 \
212 }

◆ ARRAY_6

#define ARRAY_6 ( v1,
v2,
v3,
v4,
v5,
v6,
... )
Value:
{ \
v1, v2, v3, v4, v5, v6 \
}

Definition at line 205 of file macros.h.

205#define ARRAY_6(v1, v2, v3, v4, v5, v6, ...) \
206 { \
207 v1, v2, v3, v4, v5, v6 \
208 }

◆ ARRAY_N

#define ARRAY_N ( N,
... )   _ARRAY_N(N, __VA_ARGS__)

Definition at line 231 of file macros.h.

◆ C_STR

#define C_STR ( s)    (char *)s

Definition at line 433 of file macros.h.

◆ CAT

#define CAT ( a,
V... )   _CAT(a, V)

Definition at line 51 of file macros.h.

◆ CBI

#define CBI ( n,
b )   (n &= ~__BV(b))

Definition at line 154 of file macros.h.

◆ CBI32

#define CBI32 ( n,
b )   (n &= ~_BV32(b))

Definition at line 167 of file macros.h.

◆ CC_STR

#define CC_STR ( s)    (const char *)s

Definition at line 432 of file macros.h.

◆ CEILING

#define CEILING ( x,
y )   (((x) + (y) - 1) / (y))

Definition at line 184 of file macros.h.

◆ COPY

#define COPY ( a,
b )   memcpy(a, b, MIN(sizeof(a), sizeof(b)))

Definition at line 179 of file macros.h.

◆ COUNT [1/2]

#define COUNT ( a)    (sizeof(a) / sizeof(*a))

Definition at line 177 of file macros.h.

◆ COUNT [2/2]

#define COUNT ( a)    (sizeof(a) / sizeof(*a))

Definition at line 177 of file macros.h.

◆ COUNT_ENABLED

#define COUNT_ENABLED ( V...)    DO(ENA, +, V)

Definition at line 132 of file macros.h.

◆ CYCLES_PER_MICROSECOND

#define CYCLES_PER_MICROSECOND   (F_CPU / 1000000UL)

Definition at line 243 of file macros.h.

◆ DEC_1

#define DEC_1   0

Definition at line 20 of file macros.h.

◆ DEC_2

#define DEC_2   1

Definition at line 21 of file macros.h.

◆ DEC_3

#define DEC_3   2

Definition at line 22 of file macros.h.

◆ DEC_4

#define DEC_4   3

Definition at line 23 of file macros.h.

◆ DEC_5

#define DEC_5   4

Definition at line 24 of file macros.h.

◆ DEC_6

#define DEC_6   5

Definition at line 25 of file macros.h.

◆ DEC_7

#define DEC_7   6

Definition at line 26 of file macros.h.

◆ DEC_8

#define DEC_8   7

Definition at line 27 of file macros.h.

◆ DEC_9

#define DEC_9   8

Definition at line 28 of file macros.h.

◆ DECIMAL [1/2]

#define DECIMAL ( a)    (NUMERIC(a) || a == '.')

Definition at line 174 of file macros.h.

◆ DECIMAL [2/2]

#define DECIMAL ( a)    (NUMERIC(a) || a == '.')

Definition at line 174 of file macros.h.

◆ DECIMAL_SIGNED [1/2]

#define DECIMAL_SIGNED ( a)    (DECIMAL(a) || (a) == '-' || (a) == '+')

Definition at line 176 of file macros.h.

◆ DECIMAL_SIGNED [2/2]

#define DECIMAL_SIGNED ( a)    (DECIMAL(a) || (a) == '-' || (a) == '+')

Definition at line 176 of file macros.h.

◆ DECREMENT

#define DECREMENT ( n)    DECREMENT_(n)

Definition at line 30 of file macros.h.

◆ DECREMENT_

#define DECREMENT_ ( n)    DEC_##n

Definition at line 29 of file macros.h.

◆ DEGREES

#define DEGREES ( r)    ((r) * 180.0f / M_PI)

Definition at line 183 of file macros.h.

◆ DISABLED [1/2]

#define DISABLED ( V...)    DO(DIS, &&, V)

Definition at line 128 of file macros.h.

◆ DISABLED [2/2]

#define DISABLED ( V...)    DO(DIS, &&, V)

Definition at line 128 of file macros.h.

◆ DO [1/2]

#define DO ( W,
C,
V... )   (_DO_N(W, C, NUM_ARGS(V), V))

Definition at line 96 of file macros.h.

◆ DO [2/2]

#define DO ( W,
C,
V... )   (_DO_N(W, C, NUM_ARGS(V), V))

Definition at line 96 of file macros.h.

◆ ELAPSED

#define ELAPSED ( NOW,
SOON )   (!PENDING(NOW, SOON))

Definition at line 141 of file macros.h.

◆ ENABLED [1/2]

#define ENABLED ( V...)    DO(ENA, &&, V)

Definition at line 127 of file macros.h.

◆ ENABLED [2/2]

#define ENABLED ( V...)    DO(ENA, &&, V)

Definition at line 127 of file macros.h.

◆ FIRST

#define FIRST ( a,
... )   a

Definition at line 98 of file macros.h.

◆ FIXFLOAT

#define FIXFLOAT ( f)    ({__typeof__(f) _f = (f); _f + (_f < 0 ? -0.0000005f : 0.0000005f); })

Definition at line 191 of file macros.h.

◆ FORCE_INLINE

#define FORCE_INLINE   __attribute__((always_inline)) inline

Definition at line 33 of file macros.h.

◆ HEXCHR

#define HEXCHR ( a)
Value:
(NUMERIC(a) ? (a) - '0' : WITHIN(a, 'a', 'f') ? ((a) - 'a' + 10) \
: WITHIN(a, 'A', 'F') ? ((a) - 'A' + 10) \
: -1)
#define NUMERIC(a)
Definition macros.h:173
#define WITHIN(V, L, H)
Definition macros.h:172

Definition at line 198 of file macros.h.

198#define HEXCHR(a) (NUMERIC(a) ? (a) - '0' : WITHIN(a, 'a', 'f') ? ((a) - 'a' + 10) \
199 : WITHIN(a, 'A', 'F') ? ((a) - 'A' + 10) \
200 : -1)

◆ HOUR_MS

#define HOUR_MS   ((millis_t)1000 * (millis_t)(60 * 60))

Definition at line 145 of file macros.h.

◆ IF_ELSE

#define IF_ELSE ( TF)    _IF_ELSE(_BOOL(TF))

Definition at line 108 of file macros.h.

◆ INC_0

#define INC_0   1

Definition at line 7 of file macros.h.

◆ INC_1

#define INC_1   2

Definition at line 8 of file macros.h.

◆ INC_2

#define INC_2   3

Definition at line 9 of file macros.h.

◆ INC_3

#define INC_3   4

Definition at line 10 of file macros.h.

◆ INC_4

#define INC_4   5

Definition at line 11 of file macros.h.

◆ INC_5

#define INC_5   6

Definition at line 12 of file macros.h.

◆ INC_6

#define INC_6   7

Definition at line 13 of file macros.h.

◆ INC_7

#define INC_7   8

Definition at line 14 of file macros.h.

◆ INC_8

#define INC_8   9

Definition at line 15 of file macros.h.

◆ INCREMENT

#define INCREMENT ( n)    INCREMENT_(n)

Definition at line 17 of file macros.h.

◆ INCREMENT_

#define INCREMENT_ ( n)    INC_##n

Definition at line 16 of file macros.h.

◆ IS_PROBE

#define IS_PROBE ( V...)    SECOND(V, 0)

Definition at line 102 of file macros.h.

◆ ISEOL

#define ISEOL ( C)    ((C) == '\n' || (C) == '\r')

Definition at line 195 of file macros.h.

◆ MANY

#define MANY ( V...)    (COUNT_ENABLED(V) > 1)

Definition at line 133 of file macros.h.

◆ MIN_MS

#define MIN_MS   ((millis_t)1000 * (millis_t)(60))

Definition at line 146 of file macros.h.

◆ MMM_TO_MMS

#define MMM_TO_MMS ( MM_M)    ((MM_M) / 60.0f)

Definition at line 143 of file macros.h.

◆ MMS_TO_MMM

#define MMS_TO_MMM ( MM_S)    ((MM_S) * 60.0f)

Definition at line 144 of file macros.h.

◆ NANOSECONDS_PER_CYCLE

#define NANOSECONDS_PER_CYCLE   (1000000000.0 / F_CPU)

Definition at line 247 of file macros.h.

◆ NEAR

#define NEAR ( x,
y )   NEAR_ZERO((x) - (y))

Definition at line 188 of file macros.h.

◆ NEAR_ZERO

#define NEAR_ZERO ( x)    WITHIN(x, -0.000001f, 0.000001f)

Definition at line 187 of file macros.h.

◆ NONE

#define NONE   DISABLED

Definition at line 131 of file macros.h.

◆ NOOP

#define NOOP   (void(0))

Definition at line 37 of file macros.h.

◆ NOT

#define NOT ( x)    IS_PROBE(_CAT(_NOT_, x))

Definition at line 105 of file macros.h.

◆ NUM_ARGS [1/2]

#define NUM_ARGS ( V...)    _NUM_ARGS(0, V, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)

Definition at line 43 of file macros.h.

◆ NUM_ARGS [2/2]

#define NUM_ARGS ( V...)    _NUM_ARGS(0, V, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)

Definition at line 43 of file macros.h.

◆ NUMERIC [1/2]

#define NUMERIC ( a)    WITHIN(a, '0', '9')

Definition at line 173 of file macros.h.

◆ NUMERIC [2/2]

#define NUMERIC ( a)    WITHIN(a, '0', '9')

Definition at line 173 of file macros.h.

◆ NUMERIC_SIGNED [1/2]

#define NUMERIC_SIGNED ( a)    (NUMERIC(a) || (a) == '-' || (a) == '+')

Definition at line 175 of file macros.h.

◆ NUMERIC_SIGNED [2/2]

#define NUMERIC_SIGNED ( a)    (NUMERIC(a) || (a) == '-' || (a) == '+')

Definition at line 175 of file macros.h.

◆ PENDING

#define PENDING ( NOW,
SOON )   ((long)(NOW - (SOON)) < 0)

Definition at line 140 of file macros.h.

◆ PROBE

#define PROBE ( )    ~, 1

Definition at line 103 of file macros.h.

◆ RADIANS

#define RADIANS ( d)    ((d) * M_PI / 180.0f)

Definition at line 182 of file macros.h.

◆ RECIPROCAL

#define RECIPROCAL ( x)    (NEAR_ZERO(x) ? 0 : (1 / float(x)))

Definition at line 190 of file macros.h.

◆ SBI

#define SBI ( n,
b )   (n |= __BV(b))

Definition at line 153 of file macros.h.

◆ SBI32

#define SBI32 ( n,
b )   (n |= _BV32(b))

Definition at line 166 of file macros.h.

◆ SECOND

#define SECOND ( a,
b,
... )   b

Definition at line 99 of file macros.h.

◆ SECS

#define SECS   ((millis_t)1000)

Definition at line 147 of file macros.h.

◆ SET_BIT_TO

#define SET_BIT_TO ( N,
B,
TF )
Value:
do \
{ \
if (TF) \
SBI(N, B); \
CBI(N, B); \
} while (0)

Definition at line 155 of file macros.h.

155#define SET_BIT_TO(N, B, TF) \
156 do \
157 { \
158 if (TF) \
159 SBI(N, B); \
160 else \
161 CBI(N, B); \
162 } while (0)

◆ SIGN

#define SIGN ( a)    ((a > 0) - (a < 0))

Definition at line 168 of file macros.h.

◆ SPACE

#define SPACE ( A)    " " << A << " "

Definition at line 233 of file macros.h.

◆ STRINGIFY

#define STRINGIFY ( M)    STRINGIFY_(M)

Definition at line 251 of file macros.h.

◆ STRINGIFY_

#define STRINGIFY_ ( M)    #M

Definition at line 250 of file macros.h.

◆ TEST

#define TEST ( n,
b )   !!((n) & __BV(b))

Definition at line 152 of file macros.h.

◆ TEST32

#define TEST32 ( n,
b )   !!((n) & _BV32(b))

Definition at line 165 of file macros.h.

◆ THIRD

#define THIRD ( a,
b,
c,
... )   c

Definition at line 100 of file macros.h.

◆ TWO_ARGS

#define TWO_ARGS ( V...)    _TWO_ARGS(0, V, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0)

Definition at line 47 of file macros.h.

◆ UNEAR_ZERO

#define UNEAR_ZERO ( x)    ((x) < 0.000001f)

Definition at line 186 of file macros.h.

◆ WITHIN [1/2]

#define WITHIN ( N,
L,
H )   ((N) >= (L) && (N) <= (H))

Definition at line 172 of file macros.h.

◆ WITHIN [2/2]

#define WITHIN ( V,
L,
H )   ((V) >= (L) && (V) <= (H))

Definition at line 172 of file macros.h.

◆ ZERO [1/2]

#define ZERO ( a)    memset(a, 0, sizeof(a))

Definition at line 178 of file macros.h.

◆ ZERO [2/2]

#define ZERO ( a)    memset((void *)a, 0, sizeof(a))

Definition at line 178 of file macros.h.