Skip to content

Commit 5dfc77c

Browse files
committed
Try to make the chrome header compile
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 86bb51e commit 5dfc77c

1 file changed

Lines changed: 34 additions & 27 deletions

File tree

FrameworkArgb/ec_commands.h

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,42 @@
88
#ifndef __CROS_EC_EC_COMMANDS_H
99
#define __CROS_EC_EC_COMMANDS_H
1010

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 */
3239
#ifndef BUILD_ASSERT
3340
#define BUILD_ASSERT(_cond)
3441
#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
4047
/*
4148
* Defines macros that may be needed but are for sure defined by the linux
4249
* kernel. This section is removed when cros_ec_commands.h is generated (by
@@ -67,7 +74,7 @@
6774
#endif
6875
#endif
6976

70-
#endif /* __KERNEL__ */
77+
//#endif /* __KERNEL__ */
7178

7279
#ifdef __cplusplus
7380
extern "C" {

0 commit comments

Comments
 (0)