summaryrefslogtreecommitdiff
path: root/ec_common.h
blob: a7ce19b21ccd050a03731a0b9d97fc945e27335d (plain)
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
/* ec_common.h - Common includes for Chrome EC
 *
 * (Chromium license) */

#ifndef __EC_COMMON_H
#define __EC_COMMON_H

#include <stdint.h>

typedef int EcError;  /* Functions which return error return one of these */
/* YJLOU: why not "typedef enum EcErrorListe EcError"? */

/* List of common EcError codes that can be returned */
enum EcErrorList {
  /* Success - no error */
  EC_SUCCESS = 0,
  /* Unknown error */
  EC_ERROR_UNKNOWN = 1,
  /* Function not implemented yet */
  EC_ERROR_UNIMPLEMENTED = 2,
  /* Overflow error; too much input provided. */
  EC_ERROR_OVERFLOW = 3,

  /* Module-internal error codes may use this range.   */
  EC_ERROR_INTERNAL_FIRST = 0x10000,
  EC_ERROR_INTERNAL_LAST =  0x1FFFF
};

#endif  /* __EC_COMMON_H */