You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/09/22 02:12:52 UTC

[45/59] [abbrv] incubator-mynewt-core git commit: add sys/defs package. conversion of all error codes will wait until merge with develop to avoid painful merge.

add sys/defs package.  conversion of all error codes will wait until merge with develop to avoid painful merge.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/0e029a56
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/0e029a56
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/0e029a56

Branch: refs/heads/develop
Commit: 0e029a5658a9823a04962279ab8338a2f0962bd9
Parents: e02f667
Author: Sterling Hughes <st...@apache.org>
Authored: Wed Sep 14 09:55:54 2016 -0700
Committer: Sterling Hughes <st...@apache.org>
Committed: Wed Sep 14 09:55:54 2016 -0700

----------------------------------------------------------------------
 sys/defs/include/defs/error.h | 46 ++++++++++++++++++++++++++++++++++++++
 sys/defs/pkg.yml              | 28 +++++++++++++++++++++++
 2 files changed, 74 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0e029a56/sys/defs/include/defs/error.h
----------------------------------------------------------------------
diff --git a/sys/defs/include/defs/error.h b/sys/defs/include/defs/error.h
new file mode 100644
index 0000000..319e4d4
--- /dev/null
+++ b/sys/defs/include/defs/error.h
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef H_DEFS_ERROR_
+#define H_DEFS_ERROR_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define EOK      (0)
+#define ENOMEM   (-1)
+#define EINVAL   (-2)
+#define ETIMEOUT (-3)
+#define ENOENT   (-4)
+#define EIO      (-5)
+#define EAGAIN   (-6)
+#define EACCES   (-7)
+#define EBUSY    (-8)
+#define ENODEV   (-9)
+#define ERANGE   (-10)
+
+#define E_PERUSER (-65535)
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* H_DEFS_ERROR_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0e029a56/sys/defs/pkg.yml
----------------------------------------------------------------------
diff --git a/sys/defs/pkg.yml b/sys/defs/pkg.yml
new file mode 100644
index 0000000..6f0e683
--- /dev/null
+++ b/sys/defs/pkg.yml
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: sys/defs
+pkg.description: Library providing core definitions for Mynewt system
+pkg.author: "Apache Mynewt <de...@mynewt.incubator.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+    - definitions
+    - system
+    - error
+    - power management