From 3ff432faedee2ec0b93d163e4808f391d65f1ba2 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 18 Aug 2017 15:14:17 -0500 Subject: mts-fpga-loader --- src/mts_error_codes.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/mts_error_codes.h (limited to 'src/mts_error_codes.h') diff --git a/src/mts_error_codes.h b/src/mts_error_codes.h new file mode 100644 index 0000000..52346c7 --- /dev/null +++ b/src/mts_error_codes.h @@ -0,0 +1,24 @@ +#define MTAC_SUCCESS 0 /* Operation success */ + +/* Hardware Errors */ +#define MTAC_INVALID_FPGA_VERSION 1 /* FPGA version check failed */ +#define MTAC_FILE_NOT_FOUND 2 /* Linked upgrade file not found */ +#define MTAC_INVALID_HARDWARE 3 /* MTAC Hardware does not support FPGA Upgrade */ +#define MTAC_HW_NOT_FOUND 4 /* MTAC Not found */ +#define MTAC_LOCK_FAILURE 5 /* Creset pin write failure */ +#define MTAC_OPEN_FILES 6 + +/* SPI Errors */ +#define MTAC_SPI_OPEN_FAILURE 7 /* SPI open was not successful */ +#define MTAC_SPI_TRANSFER_FAILURE 8 /* IOCTL transfer failed */ +#define MTAC_SPI_CLOSE_FAILURE 9 /* SPI close was not successful */ +#define MTAC_SPI_ERROR 10 /* Generic SPI error */ + +/* Register Errors*/ +#define MTAC_FPGA_REG_ERROR 11 /* Error reading FPGA Version */ +#define MTAC_SX1301_VERSION_FAILURE 12 /* Error reading SX1301 Version */ +#define MTAC_HASH_VERIFICATION_FAILURE 13 /* Input file's calculated hash did not match */ + +/* Flashing Failures*/ +#define MTAC_CHIP_ERASE_FAILURE 14 /* Chip erase failure */ +#define MTAC_PROGRAM_FAILURE 15 /* Flashing mtac with firmware failed */ -- cgit v1.2.3