-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlatform_Types.h
84 lines (71 loc) · 2.54 KB
/
Platform_Types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/******************************************************************************
*
* Module: Common - Platform Abstraction
*
* File Name: Platform_Types.h
*
* Description: Platform types for AVR
*
* Author: Mohamed Tarek
*
*******************************************************************************/
#ifndef PLATFORM_TYPES_H
#define PLATFORM_TYPES_H
/* Id for the company in the AUTOSAR
* for example Mohamed Tarek's ID = 1000 :) */
#define PLATFORM_VENDOR_ID (2020U)
/*
* Module Version 1.0.0
*/
#define PLATFORM_SW_MAJOR_VERSION (1U)
#define PLATFORM_SW_MINOR_VERSION (0U)
#define PLATFORM_SW_PATCH_VERSION (0U)
/*
* AUTOSAR Version 4.0.3
*/
#define PLATFORM_AR_RELEASE_MAJOR_VERSION (4U)
#define PLATFORM_AR_RELEASE_MINOR_VERSION (3U)
#define PLATFORM_AR_RELEASE_PATCH_VERSION (1U)
/*
* CPU register type width
*/
#define CPU_TYPE_8 (8U)
#define CPU_TYPE_16 (16U)
#define CPU_TYPE_32 (32U)
/*
* Bit order definition
*/
#define MSB_FIRST (0u) /* Big endian bit ordering */
#define LSB_FIRST (1u) /* Little endian bit ordering */
/*
* Byte order definition
*/
#define HIGH_BYTE_FIRST (0u) /* Big endian byte ordering */
#define LOW_BYTE_FIRST (1u) /* Little endian byte ordering */
/*
* Platform type and endianess definitions, specific for AVR
*/
#define CPU_TYPE CPU_TYPE_8
#define CPU_BIT_ORDER LSB_FIRST
#define CPU_BYTE_ORDER LOW_BYTE_FIRST
/*
* Boolean Values
*/
#ifndef FALSE
#define FALSE (0u)
#endif
#ifndef TRUE
#define TRUE (1u)
#endif
typedef unsigned char boolean;
typedef unsigned char uint8; /* 0 .. 255 */
typedef signed char sint8; /* -128 .. +127 */
typedef unsigned short uint16; /* 0 .. 65535 */
typedef signed short sint16; /* -32768 .. +32767 */
typedef unsigned long uint32; /* 0 .. 4294967295 */
typedef signed long sint32; /* -2147483648 .. +2147483647 */
typedef unsigned long long uint64; /* 0..18446744073709551615 */
typedef signed long long sint64;
typedef float float32;
typedef double float64;
#endif /* PLATFORM_TYPES_H */