foxBMS  1.4.0
The foxBMS Battery Management System API Documentation
general.h File Reference

General macros and definitions for the whole platform. More...

#include "fassert.h"
#include "fstd_types.h"
#include "mcu.h"
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for general.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GEN_SET_BIT(register, bit)   ((register) |= (uint32)((uint32)1U << (bit)))
 sets a bit to 1u More...
 
#define GEN_CLEAR_BIT(register, bit)   ((register) &= ~(uint32)((uint32)1U << (bit)))
 clears a bit to 0u More...
 
#define GEN_MUST_CHECK_RETURN   __attribute__((warn_unused_result))
 Allows functions to generate warnings in GCC for unused returns. More...
 
#define GEN_ALWAYS_INLINE   __attribute__((always_inline))
 
#define UNIT_TEST_WEAK_IMPL
 
#define GEN_REPEAT_MAXIMUM_REPETITIONS   (99u)
 
#define GEN_REPEAT_U(x, n)   GEN_REPEAT_Ux(x, n)
 Macro that helps to generate a series of literals (for array initializers). More...
 
#define GEN_STRIP(x)   GEN_STRIP_PARENS(GEN_GET_ARGS x)
 
#define GEN_BYTES_PER_WORD   (4u)
 
#define GEN_REPEAT_U1u(x)   (x)
 
#define GEN_REPEAT_U2u(x)   GEN_REPEAT_U1u(x), (x)
 
#define GEN_REPEAT_U3u(x)   GEN_REPEAT_U2u(x), (x)
 
#define GEN_REPEAT_U4u(x)   GEN_REPEAT_U3u(x), (x)
 
#define GEN_REPEAT_U5u(x)   GEN_REPEAT_U4u(x), (x)
 
#define GEN_REPEAT_U6u(x)   GEN_REPEAT_U5u(x), (x)
 
#define GEN_REPEAT_U7u(x)   GEN_REPEAT_U6u(x), (x)
 
#define GEN_REPEAT_U8u(x)   GEN_REPEAT_U7u(x), (x)
 
#define GEN_REPEAT_U9u(x)   GEN_REPEAT_U8u(x), (x)
 
#define GEN_REPEAT_U10u(x)   GEN_REPEAT_U9u(x), (x)
 
#define GEN_REPEAT_U11u(x)   GEN_REPEAT_U10u(x), (x)
 
#define GEN_REPEAT_U12u(x)   GEN_REPEAT_U11u(x), (x)
 
#define GEN_REPEAT_U13u(x)   GEN_REPEAT_U12u(x), (x)
 
#define GEN_REPEAT_U14u(x)   GEN_REPEAT_U13u(x), (x)
 
#define GEN_REPEAT_U15u(x)   GEN_REPEAT_U14u(x), (x)
 
#define GEN_REPEAT_U16u(x)   GEN_REPEAT_U15u(x), (x)
 
#define GEN_REPEAT_U17u(x)   GEN_REPEAT_U16u(x), (x)
 
#define GEN_REPEAT_U18u(x)   GEN_REPEAT_U17u(x), (x)
 
#define GEN_REPEAT_U19u(x)   GEN_REPEAT_U18u(x), (x)
 
#define GEN_REPEAT_U20u(x)   GEN_REPEAT_U19u(x), (x)
 
#define GEN_REPEAT_U21u(x)   GEN_REPEAT_U20u(x), (x)
 
#define GEN_REPEAT_U22u(x)   GEN_REPEAT_U21u(x), (x)
 
#define GEN_REPEAT_U23u(x)   GEN_REPEAT_U22u(x), (x)
 
#define GEN_REPEAT_U24u(x)   GEN_REPEAT_U23u(x), (x)
 
#define GEN_REPEAT_U25u(x)   GEN_REPEAT_U24u(x), (x)
 
#define GEN_REPEAT_U26u(x)   GEN_REPEAT_U25u(x), (x)
 
#define GEN_REPEAT_U27u(x)   GEN_REPEAT_U26u(x), (x)
 
#define GEN_REPEAT_U28u(x)   GEN_REPEAT_U27u(x), (x)
 
#define GEN_REPEAT_U29u(x)   GEN_REPEAT_U28u(x), (x)
 
#define GEN_REPEAT_U30u(x)   GEN_REPEAT_U29u(x), (x)
 
#define GEN_REPEAT_U31u(x)   GEN_REPEAT_U30u(x), (x)
 
#define GEN_REPEAT_U32u(x)   GEN_REPEAT_U31u(x), (x)
 
#define GEN_REPEAT_U33u(x)   GEN_REPEAT_U32u(x), (x)
 
#define GEN_REPEAT_U34u(x)   GEN_REPEAT_U33u(x), (x)
 
#define GEN_REPEAT_U35u(x)   GEN_REPEAT_U34u(x), (x)
 
#define GEN_REPEAT_U36u(x)   GEN_REPEAT_U35u(x), (x)
 
#define GEN_REPEAT_U37u(x)   GEN_REPEAT_U36u(x), (x)
 
#define GEN_REPEAT_U38u(x)   GEN_REPEAT_U37u(x), (x)
 
#define GEN_REPEAT_U39u(x)   GEN_REPEAT_U38u(x), (x)
 
#define GEN_REPEAT_U40u(x)   GEN_REPEAT_U39u(x), (x)
 
#define GEN_REPEAT_U41u(x)   GEN_REPEAT_U40u(x), (x)
 
#define GEN_REPEAT_U42u(x)   GEN_REPEAT_U41u(x), (x)
 
#define GEN_REPEAT_U43u(x)   GEN_REPEAT_U42u(x), (x)
 
#define GEN_REPEAT_U44u(x)   GEN_REPEAT_U43u(x), (x)
 
#define GEN_REPEAT_U45u(x)   GEN_REPEAT_U44u(x), (x)
 
#define GEN_REPEAT_U46u(x)   GEN_REPEAT_U45u(x), (x)
 
#define GEN_REPEAT_U47u(x)   GEN_REPEAT_U46u(x), (x)
 
#define GEN_REPEAT_U48u(x)   GEN_REPEAT_U47u(x), (x)
 
#define GEN_REPEAT_U49u(x)   GEN_REPEAT_U48u(x), (x)
 
#define GEN_REPEAT_U50u(x)   GEN_REPEAT_U49u(x), (x)
 
#define GEN_REPEAT_U51u(x)   GEN_REPEAT_U50u(x), (x)
 
#define GEN_REPEAT_U52u(x)   GEN_REPEAT_U51u(x), (x)
 
#define GEN_REPEAT_U53u(x)   GEN_REPEAT_U52u(x), (x)
 
#define GEN_REPEAT_U54u(x)   GEN_REPEAT_U53u(x), (x)
 
#define GEN_REPEAT_U55u(x)   GEN_REPEAT_U54u(x), (x)
 
#define GEN_REPEAT_U56u(x)   GEN_REPEAT_U55u(x), (x)
 
#define GEN_REPEAT_U57u(x)   GEN_REPEAT_U56u(x), (x)
 
#define GEN_REPEAT_U58u(x)   GEN_REPEAT_U57u(x), (x)
 
#define GEN_REPEAT_U59u(x)   GEN_REPEAT_U58u(x), (x)
 
#define GEN_REPEAT_U60u(x)   GEN_REPEAT_U59u(x), (x)
 
#define GEN_REPEAT_U61u(x)   GEN_REPEAT_U60u(x), (x)
 
#define GEN_REPEAT_U62u(x)   GEN_REPEAT_U61u(x), (x)
 
#define GEN_REPEAT_U63u(x)   GEN_REPEAT_U62u(x), (x)
 
#define GEN_REPEAT_U64u(x)   GEN_REPEAT_U63u(x), (x)
 
#define GEN_REPEAT_U65u(x)   GEN_REPEAT_U64u(x), (x)
 
#define GEN_REPEAT_U66u(x)   GEN_REPEAT_U65u(x), (x)
 
#define GEN_REPEAT_U67u(x)   GEN_REPEAT_U66u(x), (x)
 
#define GEN_REPEAT_U68u(x)   GEN_REPEAT_U67u(x), (x)
 
#define GEN_REPEAT_U69u(x)   GEN_REPEAT_U68u(x), (x)
 
#define GEN_REPEAT_U70u(x)   GEN_REPEAT_U69u(x), (x)
 
#define GEN_REPEAT_U71u(x)   GEN_REPEAT_U70u(x), (x)
 
#define GEN_REPEAT_U72u(x)   GEN_REPEAT_U71u(x), (x)
 
#define GEN_REPEAT_U73u(x)   GEN_REPEAT_U72u(x), (x)
 
#define GEN_REPEAT_U74u(x)   GEN_REPEAT_U73u(x), (x)
 
#define GEN_REPEAT_U75u(x)   GEN_REPEAT_U74u(x), (x)
 
#define GEN_REPEAT_U76u(x)   GEN_REPEAT_U75u(x), (x)
 
#define GEN_REPEAT_U77u(x)   GEN_REPEAT_U76u(x), (x)
 
#define GEN_REPEAT_U78u(x)   GEN_REPEAT_U77u(x), (x)
 
#define GEN_REPEAT_U79u(x)   GEN_REPEAT_U78u(x), (x)
 
#define GEN_REPEAT_U80u(x)   GEN_REPEAT_U79u(x), (x)
 
#define GEN_REPEAT_U81u(x)   GEN_REPEAT_U80u(x), (x)
 
#define GEN_REPEAT_U82u(x)   GEN_REPEAT_U81u(x), (x)
 
#define GEN_REPEAT_U83u(x)   GEN_REPEAT_U82u(x), (x)
 
#define GEN_REPEAT_U84u(x)   GEN_REPEAT_U83u(x), (x)
 
#define GEN_REPEAT_U85u(x)   GEN_REPEAT_U84u(x), (x)
 
#define GEN_REPEAT_U86u(x)   GEN_REPEAT_U85u(x), (x)
 
#define GEN_REPEAT_U87u(x)   GEN_REPEAT_U86u(x), (x)
 
#define GEN_REPEAT_U88u(x)   GEN_REPEAT_U87u(x), (x)
 
#define GEN_REPEAT_U89u(x)   GEN_REPEAT_U88u(x), (x)
 
#define GEN_REPEAT_U90u(x)   GEN_REPEAT_U89u(x), (x)
 
#define GEN_REPEAT_U91u(x)   GEN_REPEAT_U90u(x), (x)
 
#define GEN_REPEAT_U92u(x)   GEN_REPEAT_U91u(x), (x)
 
#define GEN_REPEAT_U93u(x)   GEN_REPEAT_U92u(x), (x)
 
#define GEN_REPEAT_U94u(x)   GEN_REPEAT_U93u(x), (x)
 
#define GEN_REPEAT_U95u(x)   GEN_REPEAT_U94u(x), (x)
 
#define GEN_REPEAT_U96u(x)   GEN_REPEAT_U95u(x), (x)
 
#define GEN_REPEAT_U97u(x)   GEN_REPEAT_U96u(x), (x)
 
#define GEN_REPEAT_U98u(x)   GEN_REPEAT_U97u(x), (x)
 
#define GEN_REPEAT_U99u(x)   GEN_REPEAT_U98u(x), (x)
 
#define GEN_REPEAT_Ux(x, n)   GEN_REPEAT_U##n(x)
 
#define GEN_GET_ARGS(...)   __VA_ARGS__
 
#define GEN_STRIP_PARENS(x)   x
 

Functions

 FAS_STATIC_ASSERT (false==0, "false seems to have been modified.")
 
 FAS_STATIC_ASSERT (true !=false, "true seems to have been modified.")
 
 FAS_STATIC_ASSERT (true==1, "true seems to have been modified.")
 
 FAS_STATIC_ASSERT (STD_OK==0, "STD_OK seems to have been modified.")
 
 FAS_STATIC_ASSERT (STD_OK !=STD_NOT_OK, "STD_OK or STD_NOT_OK seem to have been modified.")
 
 FAS_STATIC_ASSERT (STD_NOT_OK==1, "STD_NOT_OK seems to have been modified.")
 

Detailed Description

General macros and definitions for the whole platform.

SPDX-License-Identifier: BSD-3-Clause

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:

  • ″This product uses parts of foxBMS®″
  • ″This product includes parts of foxBMS®″
  • ″This product is derived from foxBMS®″
Author
foxBMS Team
Date
2019-09-24 (date of creation)
Updated
2022-07-28 (date of last update)
Version
v1.4.0
Prefix
GEN

Definition in file general.h.

Macro Definition Documentation

◆ GEN_ALWAYS_INLINE

#define GEN_ALWAYS_INLINE   __attribute__((always_inline))

This attribute tells the compiler that the function should always be inlined

Definition at line 91 of file general.h.

◆ GEN_BYTES_PER_WORD

#define GEN_BYTES_PER_WORD   (4u)

Defines the word size in bytes of the platform

Definition at line 273 of file general.h.

◆ GEN_CLEAR_BIT

#define GEN_CLEAR_BIT (   register,
  bit 
)    ((register) &= ~(uint32)((uint32)1U << (bit)))

clears a bit to 0u

Parameters
[in,out]registerregister on which to clear the bit
[in]bitnumber of the bit that should be cleared to 0u

Definition at line 79 of file general.h.

◆ GEN_GET_ARGS

#define GEN_GET_ARGS (   ...)    __VA_ARGS__

Internal helper macros for GEN_STRIP(). Do not use outside.

Definition at line 257 of file general.h.

◆ GEN_MUST_CHECK_RETURN

#define GEN_MUST_CHECK_RETURN   __attribute__((warn_unused_result))

Allows functions to generate warnings in GCC for unused returns.

This attribute allows to mark that a function return value must be used. The compiler will generate a warning when the return value of a function with this marker is not used in subsequent code.

Definition at line 88 of file general.h.

◆ GEN_REPEAT_MAXIMUM_REPETITIONS

#define GEN_REPEAT_MAXIMUM_REPETITIONS   (99u)

Maximum number of supported repetitions in GEN_REPEAT_U(). Adapt if you change implementation.

Definition at line 225 of file general.h.

◆ GEN_REPEAT_U

#define GEN_REPEAT_U (   x,
 
)    GEN_REPEAT_Ux(x, n)

Macro that helps to generate a series of literals (for array initializers).

This macro generates a series of literals for array initializers. This can be used for initializing arrays to arbitrary non-null values when their size is defined with a macro. If the array shall be initialized to null the standard {0} should be used.

Parameters
xtoken that should be repeated, e.g. true
nTimes that it should be repeated (stripped of parenthesis with GEN_STRIP() and described as unsigned integer literal) (maximum 16, GEN_REPEAT_MAXIMUM_REPETITIONS, repetitions)

Example usage:

#define ARRAY_SIZE (4u)
bool variable[ARRAY_SIZE] = {GEN_REPEAT_U(false, GEN_STRIP(ARRAY_SIZE))};

This will expand to:

bool variable[ARRAY_SIZE] = {false, false, false, false};

Definition at line 250 of file general.h.

◆ GEN_REPEAT_U10u

#define GEN_REPEAT_U10u (   x)    GEN_REPEAT_U9u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 128 of file general.h.

◆ GEN_REPEAT_U11u

#define GEN_REPEAT_U11u (   x)    GEN_REPEAT_U10u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 129 of file general.h.

◆ GEN_REPEAT_U12u

#define GEN_REPEAT_U12u (   x)    GEN_REPEAT_U11u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 130 of file general.h.

◆ GEN_REPEAT_U13u

#define GEN_REPEAT_U13u (   x)    GEN_REPEAT_U12u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 131 of file general.h.

◆ GEN_REPEAT_U14u

#define GEN_REPEAT_U14u (   x)    GEN_REPEAT_U13u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 132 of file general.h.

◆ GEN_REPEAT_U15u

#define GEN_REPEAT_U15u (   x)    GEN_REPEAT_U14u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 133 of file general.h.

◆ GEN_REPEAT_U16u

#define GEN_REPEAT_U16u (   x)    GEN_REPEAT_U15u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 134 of file general.h.

◆ GEN_REPEAT_U17u

#define GEN_REPEAT_U17u (   x)    GEN_REPEAT_U16u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 135 of file general.h.

◆ GEN_REPEAT_U18u

#define GEN_REPEAT_U18u (   x)    GEN_REPEAT_U17u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 136 of file general.h.

◆ GEN_REPEAT_U19u

#define GEN_REPEAT_U19u (   x)    GEN_REPEAT_U18u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 137 of file general.h.

◆ GEN_REPEAT_U1u

#define GEN_REPEAT_U1u (   x)    (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 119 of file general.h.

◆ GEN_REPEAT_U20u

#define GEN_REPEAT_U20u (   x)    GEN_REPEAT_U19u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 138 of file general.h.

◆ GEN_REPEAT_U21u

#define GEN_REPEAT_U21u (   x)    GEN_REPEAT_U20u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 139 of file general.h.

◆ GEN_REPEAT_U22u

#define GEN_REPEAT_U22u (   x)    GEN_REPEAT_U21u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 140 of file general.h.

◆ GEN_REPEAT_U23u

#define GEN_REPEAT_U23u (   x)    GEN_REPEAT_U22u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 141 of file general.h.

◆ GEN_REPEAT_U24u

#define GEN_REPEAT_U24u (   x)    GEN_REPEAT_U23u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 142 of file general.h.

◆ GEN_REPEAT_U25u

#define GEN_REPEAT_U25u (   x)    GEN_REPEAT_U24u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 143 of file general.h.

◆ GEN_REPEAT_U26u

#define GEN_REPEAT_U26u (   x)    GEN_REPEAT_U25u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 144 of file general.h.

◆ GEN_REPEAT_U27u

#define GEN_REPEAT_U27u (   x)    GEN_REPEAT_U26u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 145 of file general.h.

◆ GEN_REPEAT_U28u

#define GEN_REPEAT_U28u (   x)    GEN_REPEAT_U27u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 146 of file general.h.

◆ GEN_REPEAT_U29u

#define GEN_REPEAT_U29u (   x)    GEN_REPEAT_U28u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 147 of file general.h.

◆ GEN_REPEAT_U2u

#define GEN_REPEAT_U2u (   x)    GEN_REPEAT_U1u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 120 of file general.h.

◆ GEN_REPEAT_U30u

#define GEN_REPEAT_U30u (   x)    GEN_REPEAT_U29u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 148 of file general.h.

◆ GEN_REPEAT_U31u

#define GEN_REPEAT_U31u (   x)    GEN_REPEAT_U30u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 149 of file general.h.

◆ GEN_REPEAT_U32u

#define GEN_REPEAT_U32u (   x)    GEN_REPEAT_U31u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 150 of file general.h.

◆ GEN_REPEAT_U33u

#define GEN_REPEAT_U33u (   x)    GEN_REPEAT_U32u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 151 of file general.h.

◆ GEN_REPEAT_U34u

#define GEN_REPEAT_U34u (   x)    GEN_REPEAT_U33u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 152 of file general.h.

◆ GEN_REPEAT_U35u

#define GEN_REPEAT_U35u (   x)    GEN_REPEAT_U34u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 153 of file general.h.

◆ GEN_REPEAT_U36u

#define GEN_REPEAT_U36u (   x)    GEN_REPEAT_U35u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 154 of file general.h.

◆ GEN_REPEAT_U37u

#define GEN_REPEAT_U37u (   x)    GEN_REPEAT_U36u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 155 of file general.h.

◆ GEN_REPEAT_U38u

#define GEN_REPEAT_U38u (   x)    GEN_REPEAT_U37u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 156 of file general.h.

◆ GEN_REPEAT_U39u

#define GEN_REPEAT_U39u (   x)    GEN_REPEAT_U38u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 157 of file general.h.

◆ GEN_REPEAT_U3u

#define GEN_REPEAT_U3u (   x)    GEN_REPEAT_U2u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 121 of file general.h.

◆ GEN_REPEAT_U40u

#define GEN_REPEAT_U40u (   x)    GEN_REPEAT_U39u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 158 of file general.h.

◆ GEN_REPEAT_U41u

#define GEN_REPEAT_U41u (   x)    GEN_REPEAT_U40u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 159 of file general.h.

◆ GEN_REPEAT_U42u

#define GEN_REPEAT_U42u (   x)    GEN_REPEAT_U41u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 160 of file general.h.

◆ GEN_REPEAT_U43u

#define GEN_REPEAT_U43u (   x)    GEN_REPEAT_U42u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 161 of file general.h.

◆ GEN_REPEAT_U44u

#define GEN_REPEAT_U44u (   x)    GEN_REPEAT_U43u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 162 of file general.h.

◆ GEN_REPEAT_U45u

#define GEN_REPEAT_U45u (   x)    GEN_REPEAT_U44u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 163 of file general.h.

◆ GEN_REPEAT_U46u

#define GEN_REPEAT_U46u (   x)    GEN_REPEAT_U45u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 164 of file general.h.

◆ GEN_REPEAT_U47u

#define GEN_REPEAT_U47u (   x)    GEN_REPEAT_U46u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 165 of file general.h.

◆ GEN_REPEAT_U48u

#define GEN_REPEAT_U48u (   x)    GEN_REPEAT_U47u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 166 of file general.h.

◆ GEN_REPEAT_U49u

#define GEN_REPEAT_U49u (   x)    GEN_REPEAT_U48u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 167 of file general.h.

◆ GEN_REPEAT_U4u

#define GEN_REPEAT_U4u (   x)    GEN_REPEAT_U3u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 122 of file general.h.

◆ GEN_REPEAT_U50u

#define GEN_REPEAT_U50u (   x)    GEN_REPEAT_U49u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 168 of file general.h.

◆ GEN_REPEAT_U51u

#define GEN_REPEAT_U51u (   x)    GEN_REPEAT_U50u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 169 of file general.h.

◆ GEN_REPEAT_U52u

#define GEN_REPEAT_U52u (   x)    GEN_REPEAT_U51u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 170 of file general.h.

◆ GEN_REPEAT_U53u

#define GEN_REPEAT_U53u (   x)    GEN_REPEAT_U52u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 171 of file general.h.

◆ GEN_REPEAT_U54u

#define GEN_REPEAT_U54u (   x)    GEN_REPEAT_U53u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 172 of file general.h.

◆ GEN_REPEAT_U55u

#define GEN_REPEAT_U55u (   x)    GEN_REPEAT_U54u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 173 of file general.h.

◆ GEN_REPEAT_U56u

#define GEN_REPEAT_U56u (   x)    GEN_REPEAT_U55u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 174 of file general.h.

◆ GEN_REPEAT_U57u

#define GEN_REPEAT_U57u (   x)    GEN_REPEAT_U56u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 175 of file general.h.

◆ GEN_REPEAT_U58u

#define GEN_REPEAT_U58u (   x)    GEN_REPEAT_U57u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 176 of file general.h.

◆ GEN_REPEAT_U59u

#define GEN_REPEAT_U59u (   x)    GEN_REPEAT_U58u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 177 of file general.h.

◆ GEN_REPEAT_U5u

#define GEN_REPEAT_U5u (   x)    GEN_REPEAT_U4u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 123 of file general.h.

◆ GEN_REPEAT_U60u

#define GEN_REPEAT_U60u (   x)    GEN_REPEAT_U59u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 178 of file general.h.

◆ GEN_REPEAT_U61u

#define GEN_REPEAT_U61u (   x)    GEN_REPEAT_U60u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 179 of file general.h.

◆ GEN_REPEAT_U62u

#define GEN_REPEAT_U62u (   x)    GEN_REPEAT_U61u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 180 of file general.h.

◆ GEN_REPEAT_U63u

#define GEN_REPEAT_U63u (   x)    GEN_REPEAT_U62u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 181 of file general.h.

◆ GEN_REPEAT_U64u

#define GEN_REPEAT_U64u (   x)    GEN_REPEAT_U63u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 182 of file general.h.

◆ GEN_REPEAT_U65u

#define GEN_REPEAT_U65u (   x)    GEN_REPEAT_U64u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 183 of file general.h.

◆ GEN_REPEAT_U66u

#define GEN_REPEAT_U66u (   x)    GEN_REPEAT_U65u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 184 of file general.h.

◆ GEN_REPEAT_U67u

#define GEN_REPEAT_U67u (   x)    GEN_REPEAT_U66u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 185 of file general.h.

◆ GEN_REPEAT_U68u

#define GEN_REPEAT_U68u (   x)    GEN_REPEAT_U67u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 186 of file general.h.

◆ GEN_REPEAT_U69u

#define GEN_REPEAT_U69u (   x)    GEN_REPEAT_U68u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 187 of file general.h.

◆ GEN_REPEAT_U6u

#define GEN_REPEAT_U6u (   x)    GEN_REPEAT_U5u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 124 of file general.h.

◆ GEN_REPEAT_U70u

#define GEN_REPEAT_U70u (   x)    GEN_REPEAT_U69u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 188 of file general.h.

◆ GEN_REPEAT_U71u

#define GEN_REPEAT_U71u (   x)    GEN_REPEAT_U70u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 189 of file general.h.

◆ GEN_REPEAT_U72u

#define GEN_REPEAT_U72u (   x)    GEN_REPEAT_U71u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 190 of file general.h.

◆ GEN_REPEAT_U73u

#define GEN_REPEAT_U73u (   x)    GEN_REPEAT_U72u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 191 of file general.h.

◆ GEN_REPEAT_U74u

#define GEN_REPEAT_U74u (   x)    GEN_REPEAT_U73u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 192 of file general.h.

◆ GEN_REPEAT_U75u

#define GEN_REPEAT_U75u (   x)    GEN_REPEAT_U74u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 193 of file general.h.

◆ GEN_REPEAT_U76u

#define GEN_REPEAT_U76u (   x)    GEN_REPEAT_U75u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 194 of file general.h.

◆ GEN_REPEAT_U77u

#define GEN_REPEAT_U77u (   x)    GEN_REPEAT_U76u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 195 of file general.h.

◆ GEN_REPEAT_U78u

#define GEN_REPEAT_U78u (   x)    GEN_REPEAT_U77u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 196 of file general.h.

◆ GEN_REPEAT_U79u

#define GEN_REPEAT_U79u (   x)    GEN_REPEAT_U78u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 197 of file general.h.

◆ GEN_REPEAT_U7u

#define GEN_REPEAT_U7u (   x)    GEN_REPEAT_U6u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 125 of file general.h.

◆ GEN_REPEAT_U80u

#define GEN_REPEAT_U80u (   x)    GEN_REPEAT_U79u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 198 of file general.h.

◆ GEN_REPEAT_U81u

#define GEN_REPEAT_U81u (   x)    GEN_REPEAT_U80u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 199 of file general.h.

◆ GEN_REPEAT_U82u

#define GEN_REPEAT_U82u (   x)    GEN_REPEAT_U81u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 200 of file general.h.

◆ GEN_REPEAT_U83u

#define GEN_REPEAT_U83u (   x)    GEN_REPEAT_U82u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 201 of file general.h.

◆ GEN_REPEAT_U84u

#define GEN_REPEAT_U84u (   x)    GEN_REPEAT_U83u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 202 of file general.h.

◆ GEN_REPEAT_U85u

#define GEN_REPEAT_U85u (   x)    GEN_REPEAT_U84u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 203 of file general.h.

◆ GEN_REPEAT_U86u

#define GEN_REPEAT_U86u (   x)    GEN_REPEAT_U85u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 204 of file general.h.

◆ GEN_REPEAT_U87u

#define GEN_REPEAT_U87u (   x)    GEN_REPEAT_U86u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 205 of file general.h.

◆ GEN_REPEAT_U88u

#define GEN_REPEAT_U88u (   x)    GEN_REPEAT_U87u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 206 of file general.h.

◆ GEN_REPEAT_U89u

#define GEN_REPEAT_U89u (   x)    GEN_REPEAT_U88u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 207 of file general.h.

◆ GEN_REPEAT_U8u

#define GEN_REPEAT_U8u (   x)    GEN_REPEAT_U7u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 126 of file general.h.

◆ GEN_REPEAT_U90u

#define GEN_REPEAT_U90u (   x)    GEN_REPEAT_U89u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 208 of file general.h.

◆ GEN_REPEAT_U91u

#define GEN_REPEAT_U91u (   x)    GEN_REPEAT_U90u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 209 of file general.h.

◆ GEN_REPEAT_U92u

#define GEN_REPEAT_U92u (   x)    GEN_REPEAT_U91u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 210 of file general.h.

◆ GEN_REPEAT_U93u

#define GEN_REPEAT_U93u (   x)    GEN_REPEAT_U92u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 211 of file general.h.

◆ GEN_REPEAT_U94u

#define GEN_REPEAT_U94u (   x)    GEN_REPEAT_U93u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 212 of file general.h.

◆ GEN_REPEAT_U95u

#define GEN_REPEAT_U95u (   x)    GEN_REPEAT_U94u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 213 of file general.h.

◆ GEN_REPEAT_U96u

#define GEN_REPEAT_U96u (   x)    GEN_REPEAT_U95u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 214 of file general.h.

◆ GEN_REPEAT_U97u

#define GEN_REPEAT_U97u (   x)    GEN_REPEAT_U96u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 215 of file general.h.

◆ GEN_REPEAT_U98u

#define GEN_REPEAT_U98u (   x)    GEN_REPEAT_U97u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 216 of file general.h.

◆ GEN_REPEAT_U99u

#define GEN_REPEAT_U99u (   x)    GEN_REPEAT_U98u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 217 of file general.h.

◆ GEN_REPEAT_U9u

#define GEN_REPEAT_U9u (   x)    GEN_REPEAT_U8u(x), (x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 127 of file general.h.

◆ GEN_REPEAT_Ux

#define GEN_REPEAT_Ux (   x,
 
)    GEN_REPEAT_U##n(x)

Internal macros for the implementation of GEN_REPEAT_U(). Do not use outside.

Definition at line 220 of file general.h.

◆ GEN_SET_BIT

#define GEN_SET_BIT (   register,
  bit 
)    ((register) |= (uint32)((uint32)1U << (bit)))

sets a bit to 1u

Parameters
[in,out]registerregister on which to set the bit
[in]bitnumber of the bit that should be set to 1u

Definition at line 73 of file general.h.

◆ GEN_STRIP

#define GEN_STRIP (   x)    GEN_STRIP_PARENS(GEN_GET_ARGS x)

Strips a token of its surrounding parenthesis.

Definition at line 261 of file general.h.

◆ GEN_STRIP_PARENS

#define GEN_STRIP_PARENS (   x)    x

Internal helper macros for GEN_STRIP(). Do not use outside.

Definition at line 258 of file general.h.

◆ UNIT_TEST_WEAK_IMPL

#define UNIT_TEST_WEAK_IMPL

allow implementations to be weak for unit tests

Definition at line 97 of file general.h.

Function Documentation

◆ FAS_STATIC_ASSERT() [1/6]

FAS_STATIC_ASSERT ( false  = =0,
"false seems to have been modified."   
)

◆ FAS_STATIC_ASSERT() [2/6]

FAS_STATIC_ASSERT ( STD_NOT_OK  = =1,
"STD_NOT_OK seems to have been modified."   
)

◆ FAS_STATIC_ASSERT() [3/6]

FAS_STATIC_ASSERT ( STD_OK = STD_NOT_OK,
"STD_OK or STD_NOT_OK seem to have been modified."   
)

◆ FAS_STATIC_ASSERT() [4/6]

FAS_STATIC_ASSERT ( STD_OK  = =0,
"STD_OK seems to have been modified."   
)

◆ FAS_STATIC_ASSERT() [5/6]

FAS_STATIC_ASSERT ( true !  = false,
"true seems to have been modified."   
)

◆ FAS_STATIC_ASSERT() [6/6]

FAS_STATIC_ASSERT ( true  = =1,
"true seems to have been modified."   
)