#ifndef DK_ERROR_H
#define DK_ERROR_H

#include <stdint.h>

typedef uint32_t DK_Result;

#define DK_SUCCESS                 0x00000000UL
#define DK_ERROR_GENERIC           0x00000001UL
#define DK_ERROR_OUT_OF_MEMORY     0x00000002UL
#define DK_ERROR_BAD_FORMAT        0x00000003UL
#define DK_ERROR_NOT_SUPPORTED     0x00000004UL
#define DK_ERROR_NO_DATA           0x00000005UL
#define DK_ERROR_EXCESS_DATA       0x00000006UL
#define DK_ERROR_BAD_STATE         0x00000007UL
#define DK_ERROR_ACCESS_DENIED     0x00000008UL
#define DK_ERROR_INTEGRITY_FAILED  0x00000009UL
#define DK_ERROR_ON_SPIOPEN        0x0000000AUL
#define DK_ERROR_ON_ESEOPEN        0x0000000BUL
#define DK_ERROR_ON_SPICLOSE       0x0000000CUL
#define DK_ERROR_ON_ESECLOSE       0x0000000DUL
#define DK_ERROR_ON_ESESELECT      0x0000000EUL
#define DK_ERROR_OPEN_SESSION      0x0000000FUL
#define DK_ERROR_ON_SENDAPDU       0x00000010UL
#define DK_ERROR_UNEXPECTED_SW     0x00000011UL
#define DK_ERROR_BAD_PARAM         0x00000012UL
#define DK_ERROR_PREFIX_SET_PRIVATE_DATA 0x01000000UL
#define DK_ERROR_PREFIX_GET_PRIVATE_DATA 0x02000000UL
#define DK_ERROR_PREFIX_READ_BUFFER      0x04000000UL
#define DK_ERROR_PREFIX_READ_BUFFER      0x08000000UL
#define DK_ERROR_OPENING_CHANNEL_FAILED 0x00001000UL
#define DK_ERROR_CLOSING_CHANNEL_FAILED 0x00002000UL

#endif
