|
| typedef int | intCPU_t |
| | Signed integer typedef.
|
| |
| typedef unsigned int | uintCPU_t |
| | Unsigned integer typedef.
|
| |
| typedef bool | BOOL |
| | boolean typedef (1bit, for stdbool.h handling compilers)
|
| |
| typedef char | CHAR |
| | Char typedef (8bits)
|
| |
| typedef uint8_t | BYTE |
| | Unsigned Byte typedef (8bits)
|
| |
| typedef uint16_t | WORD |
| | Unsigned Word typedef (16bits)
|
| |
| typedef uint32_t | DWORD |
| | Unsigned dWord typedef (32bits)
|
| |
| typedef uint64_t | LWORD |
| | Unsigned lWord typedef (64bits)
|
| |
| typedef int8_t | SBYTE |
| | Signed Byte typedef (8bits)
|
| |
| typedef int16_t | SWORD |
| | Signed Word typedef (16bits)
|
| |
| typedef int32_t | SDWORD |
| | Signed dWord typedef (32bits)
|
| |
| typedef int64_t | SLWORD |
| | Signed lWord typedef (64bits)
|
| |
| typedef struct sBitfield8 | sBitfield8 |
| |
ARM common typedefs.
- Author
- SMFSW
- Copyright
- MIT (c) 2017-2026, SMFSW
- Warning
- Endianness for unions shall be checked following target / compiler to avoid potential headaches!
-
sBitfieldXX are defined from lsb to msb as most compiler does by default; if it's not the case, try to find a compiler directive or pragma to reverse bitfield order; if not available, define
REVERSE_BITFIELD symbol at project level.
-
For Arduino platform, some binary.h definitions needs to be undefined. If you find them useful, define
USE_INO_BINARY_HEADER before including sarmfsw.h to keep them defined. Please note, B0 & B1 Bytes sub-structures of unions defined hereafter will not be available in this case.
- Note
- For Arduino platform, prefer ANSI-C(pp) 0b notation for binary representation, instead of using defines from Arduino binary.h
-
STDBOOL_NDEF can be defined at project level if stdint.h doesn't exist for target compiler
-
STDINT_NDEF can be defined at project level if stdint.h doesn't exist for target compiler
- MISRA C:2012 Deviations
Header scope deviation has been granted for following rules:
Rule-2.3 - Advisory: unused type (misra-c2012-2.3)
Rule-19.2 - Advisory: union keyword (misra-c2012-19.2)
Rule-20.5 - Advisory: #undef (misra-c2012-20.5)
Header scope derogation authorized for:
Rule-5.5 - Required: Identifiers shall be distinct from macro name (misra-c2012-5.5)
Justification: Replacing B0 & B1 macro only for arduino platform.
Rule-21.1 - Required: #define and #undef on reserved identifiers (misra-c2012-21.1)
Justification: #define are library specific reserved identifiers.