sarmfsw: SMFSW Toolbox (for ARM & compatible with Arduino platform) 3.7
SMFSW collection of miscellaneous functions & macros (for ARM & compatible with Arduino platform)
Loading...
Searching...
No Matches
arm_typedefs.h File Reference

ARM common typedefs. More...

#include <stdbool.h>
#include <stdint.h>
Include dependency graph for arm_typedefs.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  sBitfield8_i
 
struct  sBitfield16_i
 
struct  sBitfield32_i
 
struct  sBitfield64_i
 
union  uByte_i
 
union  uWord_i
 
union  uDWord_i
 
union  uLWord_i
 

Macros

#define __STDBOOL_DEF
 
#define __STDINT_DEF
 Include stdbool.h.
 

Typedefs

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 enum eState_i eState
 
typedef enum eEdge_i eEdge
 
typedef enum eGPIOState_i eGPIOState
 
typedef enum eGPIOPull_i eGPIOPull
 
typedef struct sBitfield8_i sBitfield8
 
typedef struct sBitfield16_i sBitfield16
 
typedef struct sBitfield32_i sBitfield32
 
typedef struct sBitfield64_i sBitfield64
 
typedef union uByte_i uByte
 
typedef union uWord_i uWord
 
typedef union uDWord_i uDWord
 
typedef union uLWord_i uLWord
 

Enumerations

enum  eState_i { Off = 0U , On = 1U }
 Activation state On, Off. More...
 
enum  eEdge_i { NoEdge = 0 , Rising , Falling }
 Signal Edges. More...
 
enum  eGPIOState_i { Reset = 0 , Set , Toggle }
 GPIO possible states/actions enumeration. More...
 
enum  eGPIOPull_i { PullDown = 0 , PullUp , NoPull }
 GPIO possible pull resistor configuration. More...
 

Detailed Description

ARM common typedefs.

Author
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.

Macro Definition Documentation

◆ __STDBOOL_DEF

#define __STDBOOL_DEF

◆ __STDINT_DEF

#define __STDINT_DEF

Include stdbool.h.

Include stdint.h

Typedef Documentation

◆ BOOL

typedef bool BOOL

boolean typedef (1bit, for stdbool.h handling compilers)

◆ BYTE

typedef uint8_t BYTE

Unsigned Byte typedef (8bits)

◆ CHAR

typedef char CHAR

Char typedef (8bits)

◆ DWORD

typedef uint32_t DWORD

Unsigned dWord typedef (32bits)

◆ eEdge

typedef enum eEdge_i eEdge

◆ eGPIOPull

typedef enum eGPIOPull_i eGPIOPull

◆ eGPIOState

typedef enum eGPIOState_i eGPIOState

◆ eState

typedef enum eState_i eState

◆ intCPU_t

typedef int intCPU_t

Signed integer typedef.

◆ LWORD

typedef uint64_t LWORD

Unsigned lWord typedef (64bits)

◆ sBitfield16

typedef struct sBitfield16_i sBitfield16

◆ sBitfield32

typedef struct sBitfield32_i sBitfield32

◆ sBitfield64

typedef struct sBitfield64_i sBitfield64

◆ sBitfield8

typedef struct sBitfield8_i sBitfield8

◆ SBYTE

typedef int8_t SBYTE

Signed Byte typedef (8bits)

◆ SDWORD

typedef int32_t SDWORD

Signed dWord typedef (32bits)

◆ SLWORD

typedef int64_t SLWORD

Signed lWord typedef (64bits)

◆ SWORD

typedef int16_t SWORD

Signed Word typedef (16bits)

◆ uByte

typedef union uByte_i uByte

◆ uDWord

typedef union uDWord_i uDWord

◆ uintCPU_t

typedef unsigned int uintCPU_t

Unsigned integer typedef.

◆ uLWord

typedef union uLWord_i uLWord

◆ uWord

typedef union uWord_i uWord

◆ WORD

typedef uint16_t WORD

Unsigned Word typedef (16bits)

Enumeration Type Documentation

◆ eEdge_i

enum 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

enum eState_i

Activation state On, Off.

Enumerator
Off 

Off / Reset.

On 

On / Set.