1 /*
2  * Copyright (c) 2008-2014 Travis Geiselbrecht
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining
5  * a copy of this software and associated documentation files
6  * (the "Software"), to deal in the Software without restriction,
7  * including without limitation the rights to use, copy, modify, merge,
8  * publish, distribute, sublicense, and/or sell copies of the Software,
9  * and to permit persons to whom the Software is furnished to do so,
10  * subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be
13  * included in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  */
23 #pragma once
24 
25 #define NO_ERROR                (0)
26 #define ERR_GENERIC             (-1)
27 #define ERR_NOT_FOUND           (-2)
28 #define ERR_NOT_READY           (-3)
29 #define ERR_NO_MSG              (-4)
30 #define ERR_NO_MEMORY           (-5)
31 #define ERR_ALREADY_STARTED     (-6)
32 #define ERR_NOT_VALID           (-7)
33 #define ERR_INVALID_ARGS        (-8)
34 #define ERR_NOT_ENOUGH_BUFFER   (-9)
35 #define ERR_NOT_SUSPENDED       (-10)
36 #define ERR_OBJECT_DESTROYED    (-11)
37 #define ERR_NOT_BLOCKED         (-12)
38 #define ERR_TIMED_OUT           (-13)
39 #define ERR_ALREADY_EXISTS      (-14)
40 #define ERR_CHANNEL_CLOSED      (-15)
41 #define ERR_OFFLINE             (-16)
42 #define ERR_NOT_ALLOWED         (-17)
43 #define ERR_BAD_PATH            (-18)
44 #define ERR_ALREADY_MOUNTED     (-19)
45 #define ERR_IO                  (-20)
46 #define ERR_NOT_DIR             (-21)
47 #define ERR_NOT_FILE            (-22)
48 #define ERR_RECURSE_TOO_DEEP    (-23)
49 #define ERR_NOT_SUPPORTED       (-24)
50 #define ERR_TOO_BIG             (-25)
51 #define ERR_CANCELLED           (-26)
52 #define ERR_NOT_IMPLEMENTED     (-27)
53 #define ERR_CHECKSUM_FAIL       (-28)
54 #define ERR_CRC_FAIL            (-29)
55 #define ERR_CMD_UNKNOWN         (-30)
56 #define ERR_BAD_STATE           (-31)
57 #define ERR_BAD_LEN             (-32)
58 #define ERR_BUSY                (-33)
59 #define ERR_THREAD_DETACHED     (-34)
60 #define ERR_I2C_NACK            (-35)
61 #define ERR_ALREADY_EXPIRED     (-36)
62 #define ERR_OUT_OF_RANGE        (-37)
63 #define ERR_NOT_CONFIGURED      (-38)
64 #define ERR_NOT_MOUNTED         (-39)
65 #define ERR_FAULT               (-40)
66 #define ERR_NO_RESOURCES        (-41)
67 #define ERR_BAD_HANDLE          (-42)
68 #define ERR_ACCESS_DENIED       (-43)
69 #define ERR_PARTIAL_WRITE       (-44)
70 
71 #define ERR_USER_BASE           (-16384)
72