summaryrefslogtreecommitdiff
path: root/src/mts_error_codes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mts_error_codes.h')
-rw-r--r--src/mts_error_codes.h24
1 files changed, 24 insertions, 0 deletions
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 */