|
8 | 8 | #ifndef __CROS_EC_EC_COMMANDS_H |
9 | 9 | #define __CROS_EC_EC_COMMANDS_H |
10 | 10 |
|
11 | | -#if !defined(__ACPI__) && !defined(__KERNEL__) |
12 | | -#include <stdint.h> |
13 | | -#endif |
14 | | - |
15 | | -#ifdef CHROMIUM_EC |
16 | | -/* |
17 | | - * CHROMIUM_EC is defined by the Makefile system of Chromium EC repository. |
18 | | - * It is used to not include macros that may cause conflicts in foreign |
19 | | - * projects (refer to crbug.com/984623). |
20 | | - */ |
21 | | - |
22 | | -/* |
23 | | - * Include common.h for CONFIG_HOSTCMD_ALIGNED, if it's defined. This |
24 | | - * generates more efficient code for accessing request/response structures on |
25 | | - * ARM Cortex-M if the structures are guaranteed 32-bit aligned. |
26 | | - */ |
27 | | -#include "common.h" |
28 | | -#include "compile_time_macros.h" |
29 | | - |
30 | | -#else |
31 | | -/* If BUILD_ASSERT isn't already defined, make it a no-op */ |
| 11 | +#define UINT16_MAX 0xFFFF |
| 12 | +#define __ec_align4 |
| 13 | +#define __packed |
| 14 | +#define uint8_t UINT8 |
| 15 | +#define uint16_t UINT8 |
| 16 | +#define uint32_t UINT32 |
| 17 | + |
| 18 | +//#if !defined(__ACPI__) && !defined(__KERNEL__) |
| 19 | +//#include <stdint.h> |
| 20 | +//#endif |
| 21 | +// |
| 22 | +//#ifdef CHROMIUM_EC |
| 23 | +///* |
| 24 | +// * CHROMIUM_EC is defined by the Makefile system of Chromium EC repository. |
| 25 | +// * It is used to not include macros that may cause conflicts in foreign |
| 26 | +// * projects (refer to crbug.com/984623). |
| 27 | +// */ |
| 28 | +// |
| 29 | +///* |
| 30 | +// * Include common.h for CONFIG_HOSTCMD_ALIGNED, if it's defined. This |
| 31 | +// * generates more efficient code for accessing request/response structures on |
| 32 | +// * ARM Cortex-M if the structures are guaranteed 32-bit aligned. |
| 33 | +// */ |
| 34 | +//#include "common.h" |
| 35 | +//#include "compile_time_macros.h" |
| 36 | +// |
| 37 | +//#else |
| 38 | +///* If BUILD_ASSERT isn't already defined, make it a no-op */ |
32 | 39 | #ifndef BUILD_ASSERT |
33 | 40 | #define BUILD_ASSERT(_cond) |
34 | 41 | #endif /* !BUILD_ASSERT */ |
35 | | -#endif /* CHROMIUM_EC */ |
36 | | - |
37 | | -#ifdef __KERNEL__ |
38 | | -#include <linux/limits.h> |
39 | | -#else |
| 42 | +//#endif /* CHROMIUM_EC */ |
| 43 | +// |
| 44 | +//#ifdef __KERNEL__ |
| 45 | +//#include <linux/limits.h> |
| 46 | +//#else |
40 | 47 | /* |
41 | 48 | * Defines macros that may be needed but are for sure defined by the linux |
42 | 49 | * kernel. This section is removed when cros_ec_commands.h is generated (by |
|
67 | 74 | #endif |
68 | 75 | #endif |
69 | 76 |
|
70 | | -#endif /* __KERNEL__ */ |
| 77 | +//#endif /* __KERNEL__ */ |
71 | 78 |
|
72 | 79 | #ifdef __cplusplus |
73 | 80 | extern "C" { |
|
0 commit comments