ARM common typedefs.
More...
#include <stdbool.h>
#include <stdint.h>
ARM common typedefs.
- Author
- SMFSW
- Copyright
- MIT (c) 2017-2024, 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 I_FIND_BINARY_HEADER_USEFUL in project to redefine them. Please note, B0 & B1 Bytes sub-structures of sBitfieldXX will not be available anymore (please refer to following note)
- Note
- For Arduino platform, prefer ANSI-C(pp) 0b notation for binary representation, instead of using derived 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-19.2 - Advisory: union
keyword (misra-c2012-19.2)
Header scope legitimate use derogation authorized for:
Rule-21.1 - Required: #define
and #undef
on reserved identifiers (misra-c2012-21.1)
Justification: #define
are library specific reserved identifiers.
◆ __STDBOOL_DEF
◆ __STDINT_DEF
Include stdbool.h.
Include stdint.h
◆ BOOL
boolean typedef (1bit, for stdbool.h handling compilers)
◆ BYTE
Unsigned Byte typedef (8bits)
◆ CHAR
◆ DWORD
Unsigned dWord typedef (32bits)
◆ eEdge
◆ eGPIOPull
◆ eGPIOState
◆ eState
◆ intCPU_t
◆ LWORD
Unsigned lWord typedef (64bits)
◆ sBitfield16
◆ sBitfield32
◆ sBitfield64
◆ sBitfield8
◆ SBYTE
Signed Byte typedef (8bits)
◆ SDWORD
Signed dWord typedef (32bits)
◆ SLWORD
Signed lWord typedef (64bits)
◆ SWORD
Signed Word typedef (16bits)
◆ uByte
◆ uDWord
◆ uintCPU_t
Unsigned integer typedef.
◆ uLWord
◆ uWord
◆ WORD
Unsigned Word typedef (16bits)
◆ eEdge_i
Signal Edges.
Enumerator |
---|
NoEdge | No change.
|
Rising | Rising edge.
|
Falling | Falling edge.
|
◆ eGPIOPull_i
GPIO possible pull resistor configuration.
Enumerator |
---|
PullDown | GPIO with pull down.
|
PullUp | GPIO with pull up.
|
NoPull | GPIO without pull.
|
◆ eGPIOState_i
GPIO possible states/actions enumeration.
Enumerator |
---|
Reset | Reset State.
|
Set | Set State.
|
Toggle | Toggle Output - Note
- Toggle is only GPIO output related
|
◆ eState_i
Activation state On, Off.
Enumerator |
---|
Off | Off / Reset.
|
On | On / Set.
|