1 /* 2 * Copyright (c) 2008-2014 Travis Geiselbrecht 3 * 4 * Use of this source code is governed by a MIT-style 5 * license that can be found in the LICENSE file or at 6 * https://opensource.org/licenses/MIT 7 */ 8 #pragma once 9 10 #ifndef ASSEMBLY 11 #include <sys/types.h> // for status_t 12 #endif 13 14 #define NO_ERROR (0) 15 #define ERR_GENERIC (-1) 16 #define ERR_NOT_FOUND (-2) 17 #define ERR_NOT_READY (-3) 18 #define ERR_NO_MSG (-4) 19 #define ERR_NO_MEMORY (-5) 20 #define ERR_ALREADY_STARTED (-6) 21 #define ERR_NOT_VALID (-7) 22 #define ERR_INVALID_ARGS (-8) 23 #define ERR_NOT_ENOUGH_BUFFER (-9) 24 #define ERR_NOT_SUSPENDED (-10) 25 #define ERR_OBJECT_DESTROYED (-11) 26 #define ERR_NOT_BLOCKED (-12) 27 #define ERR_TIMED_OUT (-13) 28 #define ERR_ALREADY_EXISTS (-14) 29 #define ERR_CHANNEL_CLOSED (-15) 30 #define ERR_OFFLINE (-16) 31 #define ERR_NOT_ALLOWED (-17) 32 #define ERR_BAD_PATH (-18) 33 #define ERR_ALREADY_MOUNTED (-19) 34 #define ERR_IO (-20) 35 #define ERR_NOT_DIR (-21) 36 #define ERR_NOT_FILE (-22) 37 #define ERR_RECURSE_TOO_DEEP (-23) 38 #define ERR_NOT_SUPPORTED (-24) 39 #define ERR_TOO_BIG (-25) 40 #define ERR_CANCELLED (-26) 41 #define ERR_NOT_IMPLEMENTED (-27) 42 #define ERR_CHECKSUM_FAIL (-28) 43 #define ERR_CRC_FAIL (-29) 44 #define ERR_CMD_UNKNOWN (-30) 45 #define ERR_BAD_STATE (-31) 46 #define ERR_BAD_LEN (-32) 47 #define ERR_BUSY (-33) 48 #define ERR_THREAD_DETACHED (-34) 49 #define ERR_I2C_NACK (-35) 50 #define ERR_ALREADY_EXPIRED (-36) 51 #define ERR_OUT_OF_RANGE (-37) 52 #define ERR_NOT_CONFIGURED (-38) 53 #define ERR_NOT_MOUNTED (-39) 54 #define ERR_FAULT (-40) 55 #define ERR_NO_RESOURCES (-41) 56 #define ERR_BAD_HANDLE (-42) 57 #define ERR_ACCESS_DENIED (-43) 58 #define ERR_PARTIAL_WRITE (-44) 59 60 #define ERR_USER_BASE (-16384) 61