Speeduino
Loading...
Searching...
No Matches
Macros
preprocessor.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define UNUSED(x)    (void)(x)
 Used to suppress unused parameter compiler warnings.
 
#define _countof(x)    (sizeof((x)) / sizeof ((x)[0]))
 Compile time calculation of an array size.
 
#define _end_range_address(array)    ((array) + _countof((array)))
 Obtain a pointer to 1 element past the end of an array.
 
#define _end_range_byte_address(array)    (((byte*)(array)) + sizeof((array)))
 Obtain a pointer to 1 byte past the end of an array.
 
#define PP_INC(x)    PP_INC_I(x)
 Pre-processor arithmetic increment (pulled from Boost.Preprocessor)
 
#define CONCAT(A, B)    CAT_HELPER(A, B)
 Concatenate A & B after macro expansion.
 

Detailed Description

This file contains various shared utility macros that make writing function style macros easier.

Macro Definition Documentation

◆ _countof

#define _countof (   x)     (sizeof((x)) / sizeof ((x)[0]))

Compile time calculation of an array size.

◆ _end_range_address

#define _end_range_address (   array)     ((array) + _countof((array)))

Obtain a pointer to 1 element past the end of an array.

◆ _end_range_byte_address

#define _end_range_byte_address (   array)     (((byte*)(array)) + sizeof((array)))

Obtain a pointer to 1 byte past the end of an array.

◆ CONCAT

#define CONCAT (   A,
  B 
)     CAT_HELPER(A, B)

Concatenate A & B after macro expansion.

◆ PP_INC

#define PP_INC (   x)     PP_INC_I(x)

Pre-processor arithmetic increment (pulled from Boost.Preprocessor)

◆ UNUSED

#define UNUSED (   x)     (void)(x)

Used to suppress unused parameter compiler warnings.