Linearization inlines.
More...
|
| #define | LINEAR_TAB(name, nbElem) |
| | Pattern tab typedef declaration with name catenation and nbElem max array elements.
|
| |
| #define | LINEAR_EVAL(name, val) |
| | Macro to call linearization on a LINEAR_TAB or sLinearFlexArray typedef.
|
| |
Linearization inlines.
- Author
- SMFSW
- Copyright
- MIT (c) 2017-2026, SMFSW
◆ LINEAR_EVAL
| #define LINEAR_EVAL |
( |
| name, |
|
|
| val ) |
Value:
SDWORD linearization_eval(const SDWORD array[][2], const DWORD nb, const SDWORD val)
2 dimensional linearization
Definition arm_inlines_linearization.h:60
Macro to call linearization on a LINEAR_TAB or sLinearFlexArray typedef.
- MISRA C:2012 Deviations
- Local legitimate use derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: Result expansion of name wouldn't produce the desired structured access expansion.
◆ LINEAR_TAB
| #define LINEAR_TAB |
( |
| name, |
|
|
| nbElem ) |
Value: typedef struct sLinear##name { \
} sLinear##name;
int32_t SDWORD
Signed dWord typedef (32bits)
Definition arm_typedefs.h:92
uint32_t DWORD
Unsigned dWord typedef (32bits)
Definition arm_typedefs.h:88
Pattern tab typedef declaration with name catenation and nbElem max array elements.
- MISRA C:2012 Deviations
- Local deviation has been granted for following rules:
Rule-20.10 - Advisory: # and ## preprocessor operators (misra-c2012-20.10)
◆ linearization_eval()
2 dimensional linearization
- Parameters
-
| [in] | array | - pointer to 2 dimensional array |
| [in] | nb | - Number of items of the array |
| [in] | val | - Value to evaluate |
- Returns
- Evaluated value in regard of val
◆ linearization_eval_flex()
2 dimensional linearization (flexible member array)
- Parameters
-
| [in] | pArray | - pointer to flexible member array structure |
| [in] | val | - Value to evaluate |
- Returns
- Evaluated value in regard of val