XDK API  3.6.0
Documentation
Files | Macros

Basic macro definitions and standard imports. More...

+ Collaboration diagram for Basics:

Files

file  BCDS_Basics.h
 

Macros

#define BCDS_ALWAYS_INLINE
 Macro to force the compiler to always inline an inline function. More...
 
#define BCDS_DEPRECATED(param)   param __attribute__ ((deprecated))
 Macro to inform the compiler that a function or type is deprecated. More...
 
#define BCDS_INLINE   __attribute__((__unused__))
 Macro to inline a function. More...
 
#define BCDS_SECTION(sectionName)
 Macro to inform the compiler that this section is a part of the provided linker section. More...
 
#define BCDS_UNUSED(variableName)   ((void) variableName)
 Macro to inform the compiler that a variable is intentionally not in use. More...
 
#define BCDS_UNUSED_FUNC(function)   function
 Macro to inform the compiler that a function is intentionally not in use. More...
 
#define false   ((bool) 0)
 
#define FALSE   ((bool) 0)
 
#define NULL   ((void *) 0)
 
#define null   ((void *) 0)
 
#define true   ((bool) 1)
 
#define TRUE   ((bool) 1)
 

Detailed Description

This file provides the standard int and bool header support apart from compiler abstraction library.

Macro Definition Documentation

#define BCDS_ALWAYS_INLINE

GCC: in GCC, the inline keyword is not always regarded by the compiler. Based on the situation the compiler can decide to emit a real function instead of the function body only. Defining a function as always_inline makes it madatory for the compiler to inline it always.

1 BCDS_ALWAYS_INLINE void FOO_foo(void){ ; }
Note
Inlining makes C level debugging hard as the inlined code is not aligned with the source file. To eliminate this issue, in debug builds the macro is disabled.
#define BCDS_DEPRECATED (   param )    param __attribute__ ((deprecated))
Parameters
[in]param: function or type to deprecate.
#define BCDS_INLINE   __attribute__((__unused__))

GCC: in GCC, the inline keyword is not always regarded by the compiler. Based on the situation the compiler can decide to emit a real function instead of the function body only. Inline is not supported by C89 or before C standards.

1 BCDS_INLINE void FOO_foo(void){ ; }
Note
Inlining makes C level debugging hard as the inlined code is not aligned with the source file.
#define BCDS_SECTION (   sectionName)
1 void BCDS_SECTION(section_name)
Parameters
[in]sectionName: The section name that has been provided in the Linker file.
#define BCDS_UNUSED (   variableName)    ((void) variableName)
Parameters
[in]variableName: The unused variable.
#define BCDS_UNUSED_FUNC (   function)    function

GCC: in GCC the compiler option -Wunused (-Wall) generates warnings if a function is not in use. Using the BCDS_UNUSED_FUNC() macro results in the following changes in compiler behavior:

  • attached to a function, the macro means that the function is meant to be possibly unused. GCC will not produce a warning for this function.
1 void BCDS_UNUSED_FUNC(FOO_foo(uint8_t param1, uint8_t param2)){ ; }
Parameters
[in]function: The unused function with its arguments list.
#define false   ((bool) 0)
#define FALSE   ((bool) 0)
#define NULL   ((void *) 0)
#define null   ((void *) 0)
#define true   ((bool) 1)
#define TRUE   ((bool) 1)

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:53 by doxygen 1.8.8