diff options
author | Randall Spangler <rspangler@chromium.org> | 2011-12-07 18:51:09 +0000 |
---|---|---|
committer | Vincent Palatin <vpalatin@chromium.org> | 2011-12-07 19:10:02 +0000 |
commit | bdf7da5b082f6d18dd27f1e5d8cca0b12154a28c (patch) | |
tree | 6f14312a6cc70d056efc2bede8728c0868266719 /include/common.h | |
parent | abe5786058f4b60dc6d30e7d7c964aae850caa1f (diff) | |
download | chrome-ec-bdf7da5b082f6d18dd27f1e5d8cca0b12154a28c.tar.gz |
Initial sources import 1/3
source files mainly done by Randall.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Change-Id: Iaff83a842b17f3350fb6f2a3f1597ad4c29bd12a
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h new file mode 100644 index 0000000000..ceb2bc873f --- /dev/null +++ b/include/common.h @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* common.h - Common includes for Chrome EC */ + +#ifndef __CROS_EC_COMMON_H +#define __CROS_EC_COMMON_H + +#include <stdint.h> + +/* List of common error codes that can be returned */ +enum ec_error_list { + /* 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, + /* Timeout */ + EC_ERROR_TIMEOUT = 4, + /* Invalid argument */ + EC_ERROR_INVAL = 5, + /* Already in use */ + EC_ERROR_BUSY = 6, + + /* Module-internal error codes may use this range. */ + EC_ERROR_INTERNAL_FIRST = 0x10000, + EC_ERROR_INTERNAL_LAST = 0x1FFFF +}; + +#endif /* __CROS_EC_COMMON_H */ |