STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
Loading...
Searching...
No Matches
Platform_Types.h File Reference

Specification of Platform Types More...

#include <stdbool.h>

Go to the source code of this file.

Macros

CPU_Types

Symbols that specify the CPU type according to its own arquitecture (8, 16, 32 or 64 bits)

Requirement
SWS_Platform_00045, SWS_Platform_00064
#define CPU_TYPE_8   8
 
#define CPU_TYPE_16   16
 
#define CPU_TYPE_32   32
 
#define CPU_TYPE_64   64
 
Bit_order

Symbols to specify the bit order according to the CPU endianess, LSB for little endian and MSB for big endian

Requirement
SWS_Platform_00038
#define MSB_FIRST   0
 
#define LSB_FIRST   1
 
Byte_order

Symbols to specify the endianess types of the CPU

Requirement
SWS_Platform_00039
#define HIGH_BYTE_FIRST   0
 
#define LOW_BYTE_FIRST   1
 
CPU_Definition

Specifies the CPU data and endianess arquitecture. In this case the values correspond to the mcu stm32g0xx wich has a little endian 32 bits CPU

Requirement
SWS_Platform_00046, SWS_Platform_00043, SWS_Platform_00044, SWS_Platform_00048, SWS_Platform_00049, SWS_Platform_00050, SWS_Platform_00051, SWS_Platform_00052
#define CPU_TYPE   CPU_TYPE_32
 
#define CPU_BIT_ORDER   LSB_FIRST
 
#define CPU_BYTE_ORDER   LOW_BYTE_FIRST
 
boolean_values

Symbols to specify true and false values

Requirement
SWS_Platform_00056, SWS_Platform_00054, SWS_Platform_00055
#define TRUE   1
 
#define FALSE   0
 

Typedefs

unsigned_types

Cross platform type definitions to declare unsigned integer variables of 8, 16, 32, 64 and boolean values

Requirement
SWS_Platform_00027, SWS_Platform_00034, SWS_Platform_00026, SWS_Platform_00013, SWS_Platform_00014, SWS_Platform_00015, SWS_Platform_00066
typedef bool boolean
 
typedef unsigned char uint8
 
typedef unsigned short uint16
 
typedef unsigned int uint32
 
typedef unsigned long long uint64
 
signed_types

Cross platform type definitions to declare signed integer variables of 8, 16, 32 and 64 values

Requirement
SWS_Platform_00016, SWS_Platform_00017, SWS_Platform_00018, SWS_Platform_00067
typedef signed char sint8
 
typedef signed short sint16
 
typedef signed int sint32
 
typedef signed long long sint64
 
unsigned_least

Cross platform type definitions to declare max or min ranges of unsigned 8, 16 and 32 values

Requirement
SWS_Platform_00020, SWS_Platform_00021, SWS_Platform_00022
typedef unsigned long uint8_least
 
typedef unsigned long uint16_least
 
typedef unsigned long uint32_least
 
signed_least

Cross platform type definitions to declare max or min ranges of signed 8, 16 and 32 values

Requirement
SWS_Platform_00023, SWS_Platform_00024, SWS_Platform_00025
typedef signed long sint8_least
 
typedef signed long sint16_least
 
typedef signed long sint32_least
 
floating_point

Cross platform type definitions to declare floating point variables of single and double presicion

Requirement
SWS_Platform_00041, SWS_Platform_00042
typedef float float32
 
typedef double float64
 
void_pointers

Cross platform type definitions to declare void pointers

Requirement
SWS_Platform_91001, SWS_Platform_91002
typedef void * VoidPtr
 
typedef const void * ConstVoidPtr
 

Detailed Description

Specification of Platform Types

This file contains all platform dependent types and symbols. Those types must be abstracted in order to be-come platform and compiler independent. It is required that all platform types files are unique within the AUTOSAR community to guarantee unique types per platform and to avoid type changes when moving a software module from platform A to B.

Macro Definition Documentation

◆ CPU_BIT_ORDER

#define CPU_BIT_ORDER   LSB_FIRST

CPU bit order (lsb or msb)

◆ CPU_BYTE_ORDER

#define CPU_BYTE_ORDER   LOW_BYTE_FIRST

Endianess type little or big

◆ CPU_TYPE

#define CPU_TYPE   CPU_TYPE_32

Indicate the CPU type (8,16,32 or 64 bits)

◆ CPU_TYPE_16

#define CPU_TYPE_16   16

Define a 16 bit CPU, ejem. PIC24F, S12, xMega etc..

◆ CPU_TYPE_32

#define CPU_TYPE_32   32

Define a 32 bit CPU, ejem. PIC132MX, STM32, TC2xx etc..

◆ CPU_TYPE_64

#define CPU_TYPE_64   64

Define a 64 bit CPU, ejem. ARMv8, x86 etc..

◆ CPU_TYPE_8

#define CPU_TYPE_8   8

Define a 8 bit CPU, ejem. PIC18F, ATmega, STM8 etc..

◆ FALSE

#define FALSE   0

Boolean representation of false

◆ HIGH_BYTE_FIRST

#define HIGH_BYTE_FIRST   0

Define a CPU with a big endian arquitecture

◆ LOW_BYTE_FIRST

#define LOW_BYTE_FIRST   1

Define a CPU with a little endian arquitecture

◆ LSB_FIRST

#define LSB_FIRST   1

CPU with least significant bit aranged first

◆ MSB_FIRST

#define MSB_FIRST   0

CPU with most significant bit aranged first

◆ TRUE

#define TRUE   1

Boolean representation of true

Typedef Documentation

◆ boolean

typedef bool boolean

standar type that represents values TRUE or FALSE

◆ ConstVoidPtr

typedef const void* ConstVoidPtr

standar type to declare constant void pointers. This type shall be used for buffers that are passed to the callee

◆ float32

typedef float float32

standar type to declare single precision floating point variables in the range of -3.4028235e+38..+3.4028235e+38

◆ float64

typedef double float64

standar type to declare double precision floating point variables in the range of -1.7976931348623157e+308..+1.7976931348623157e+308

◆ sint16

typedef signed short sint16

standar type to declare two byte variables that store values in the range -32,768..+32,767

◆ sint16_least

typedef signed long sint16_least

standar type to declare max or min ranges for a signed two byte variable

◆ sint32

typedef signed int sint32

standar type to declare four byte variables that store values in the range -2,147,483,648..+2,147,483,647

◆ sint32_least

typedef signed long sint32_least

standar type to declare max or min ranges for a signed four byte variable

◆ sint64

typedef signed long long sint64

standar type to declare eight byte variables that store values in the range -9,223,372,036,854,775,808..+9,223,372,036,854,775,807

◆ sint8

typedef signed char sint8

standar type to declare one byte variables that store values in the range 128..+127

◆ sint8_least

typedef signed long sint8_least

standar type to declare max or min ranges for a signed one byte variable

◆ uint16

typedef unsigned short uint16

standar type to declare two byte variables that store values in the range 0..65,535

◆ uint16_least

typedef unsigned long uint16_least

standar type to declare max or min ranges for an unsigned two byte variable

◆ uint32

typedef unsigned int uint32

standar type to declare four byte variables that store values in the range 0..4,294,967,295

◆ uint32_least

typedef unsigned long uint32_least

standar type to declare max or min ranges for an unsigned four byte variable

◆ uint64

typedef unsigned long long uint64

standar type to declare eight byte variables that store values in the range 0..18,446,744,073,709,551,615

◆ uint8

typedef unsigned char uint8

standar type to declare one byte variables that store values in the range 0..255

◆ uint8_least

typedef unsigned long uint8_least

standar type to declare max or min ranges for an unsigned one byte variable

◆ VoidPtr

typedef void* VoidPtr

standar type to declare void pointers, his type shall be used for buffers that contain data returned to the caller