// TODO: autogenerate with `enumgen.py`
enum Error {
#undef ERR_ACCESS_DENIED
  ERR_ACCESS_DENIED = (-43),
#undef ERR_ALREADY_EXISTS
  ERR_ALREADY_EXISTS = (-14),
#undef ERR_ALREADY_EXPIRED
  ERR_ALREADY_EXPIRED = (-36),
#undef ERR_ALREADY_MOUNTED
  ERR_ALREADY_MOUNTED = (-19),
#undef ERR_ALREADY_STARTED
  ERR_ALREADY_STARTED = (-6),
#undef ERR_BAD_HANDLE
  ERR_BAD_HANDLE = (-42),
#undef ERR_BAD_LEN
  ERR_BAD_LEN = (-32),
#undef ERR_BAD_PATH
  ERR_BAD_PATH = (-18),
#undef ERR_BAD_STATE
  ERR_BAD_STATE = (-31),
#undef ERR_BUSY
  ERR_BUSY = (-33),
#undef ERR_CANCELLED
  ERR_CANCELLED = (-26),
#undef ERR_CHANNEL_CLOSED
  ERR_CHANNEL_CLOSED = (-15),
#undef ERR_CHECKSUM_FAIL
  ERR_CHECKSUM_FAIL = (-28),
#undef ERR_CMD_UNKNOWN
  ERR_CMD_UNKNOWN = (-30),
#undef ERR_CRC_FAIL
  ERR_CRC_FAIL = (-29),
#undef ERR_FAULT
  ERR_FAULT = (-40),
#undef ERR_GENERIC
  ERR_GENERIC = (-1),
#undef ERR_I2C_NACK
  ERR_I2C_NACK = (-35),
#undef ERR_INVALID_ARGS
  ERR_INVALID_ARGS = (-8),
#undef ERR_IO
  ERR_IO = (-20),
#undef ERR_NOT_ALLOWED
  ERR_NOT_ALLOWED = (-17),
#undef ERR_NOT_BLOCKED
  ERR_NOT_BLOCKED = (-12),
#undef ERR_NOT_CONFIGURED
  ERR_NOT_CONFIGURED = (-38),
#undef ERR_NOT_DIR
  ERR_NOT_DIR = (-21),
#undef ERR_NOT_ENOUGH_BUFFER
  ERR_NOT_ENOUGH_BUFFER = (-9),
#undef ERR_NOT_FILE
  ERR_NOT_FILE = (-22),
#undef ERR_NOT_FOUND
  ERR_NOT_FOUND = (-2),
#undef ERR_NOT_IMPLEMENTED
  ERR_NOT_IMPLEMENTED = (-27),
#undef ERR_NOT_MOUNTED
  ERR_NOT_MOUNTED = (-39),
#undef ERR_NOT_READY
  ERR_NOT_READY = (-3),
#undef ERR_NOT_SUPPORTED
  ERR_NOT_SUPPORTED = (-24),
#undef ERR_NOT_SUSPENDED
  ERR_NOT_SUSPENDED = (-10),
#undef ERR_NOT_VALID
  ERR_NOT_VALID = (-7),
#undef ERR_NO_MEMORY
  ERR_NO_MEMORY = (-5),
#undef ERR_NO_MSG
  ERR_NO_MSG = (-4),
#undef ERR_NO_RESOURCES
  ERR_NO_RESOURCES = (-41),
#undef ERR_OBJECT_DESTROYED
  ERR_OBJECT_DESTROYED = (-11),
#undef ERR_OFFLINE
  ERR_OFFLINE = (-16),
#undef ERR_OUT_OF_RANGE
  ERR_OUT_OF_RANGE = (-37),
#undef ERR_PARTIAL_WRITE
  ERR_PARTIAL_WRITE = (-44),
#undef ERR_RECURSE_TOO_DEEP
  ERR_RECURSE_TOO_DEEP = (-23),
#undef ERR_THREAD_DETACHED
  ERR_THREAD_DETACHED = (-34),
#undef ERR_TIMED_OUT
  ERR_TIMED_OUT = (-13),
#undef ERR_TOO_BIG
  ERR_TOO_BIG = (-25),
#undef ERR_USER_BASE
  ERR_USER_BASE = (-16384),
#undef NO_ERROR
  NO_ERROR = (0),
};