c4e_sys.h File Reference
(Version 554)
System-wide used (common) types, defines and macros.
More...
#include "c4e_arch.h"
#include <assert.h>
Go to the source code of this file.
Detailed Description
System-wide used (common) types, defines and macros.
- Author:
- Copyright (C) 2007-2015 Ralf Hoppe <ralf.hoppe@ieee.org>
- Version:
- Id
- c4e_sys.h 554 2015-03-09 16:50:11Z ralf
Definition in file c4e_sys.h.
Define Documentation
#define C4E_SYS_UINT8_ZERO |
#define C4E_SYS_UINT8_ONE |
#define C4E_SYS_DIGIT_ZERO |
#define C4E_SYS_DIGIT_ONE |
#define C4E_SYS_DIGIT_MAX |
#define C4E_SYS_DIGIT_BITS |
#define C4E_SYS_DIGIT_MSBIT |
#define C4E_SYS_DIGIT_LSBYTE |
#define C4E_SYS_DIGIT_MSBYTE |
#define C4E_SYS_VECTOR_SIZE |
( |
vec |
|
) |
|
Returns the number of elements in a vector (array).
- Parameters:
-
[in] | vec | C language array (pointer). |
- Returns:
- The number of elements in
vec
, determined from sizeof().
Definition at line 182 of file c4e_sys.h.
#define C4E_SYS_DIV_CEIL |
( |
x, |
|
|
m |
|
) |
|
Integer division with round up (ceil).
- Parameters:
-
[in] | x | Integer number to divide |
[in] | m | Divisor |
- Returns:
- Ceil of
x
/ m
Definition at line 195 of file c4e_sys.h.
#define C4E_ASSERT |
( |
cond |
|
) |
|
Assert condition cond
, else exit program.
- Customize:
- Customize to fit your special needs when debugging
- Parameters:
-
[in] | cond | Condition which must evaluate C4E_TRUE |
Definition at line 210 of file c4e_sys.h.
#define C4E_SYS_CAST |
( |
type, |
|
|
any |
|
) |
|
Cast of any expression to a specific type.
- Note:
- A pointer cast always violates MISRA-C:2004 advisory rule 11.4.
- Parameters:
-
[in] | type | Target type |
[in] | any | Any expression (most an integral type or pointer) |
- Returns:
- The expression
any
as type type
.
Definition at line 229 of file c4e_sys.h.
#define C4E_SYS_CAST_UINT8PTR |
( |
any |
|
) |
|
Cast of any expression to a C4eArchUint8 pointer.
- Note:
- A pointer cast always violates MISRA-C:2004 advisory rule 11.4.
- Parameters:
-
[in] | any | Any expression (typically a pointer) |
- Returns:
- The expression
any
as type C4eArchUint8 *
Definition at line 244 of file c4e_sys.h.