1 /* 2 * @ : Copyright (c) 2021 Phytium Information Technology, Inc. 3 * 4 * SPDX-License-Identifier: Apache-2.0. 5 * 6 * @Date: 2021-04-07 09:53:07 7 * @LastEditTime: 2021-04-07 15:31:10 8 * @Description: This files is for definition of status 9 * 10 * @Modify History: 11 * Ver Who Date Changes 12 * ----- ------ -------- -------------------------------------- 13 */ 14 15 #ifndef FT_STATUS_H 16 #define FT_STATUS_H 17 18 /** 19 @name Common Status Codes 20 */ 21 22 typedef enum 23 { 24 FST_SUCCESS = 0L, 25 FST_FAILURE = 1L, 26 FST_INSTANCE_NOT_FOUND = 2L, 27 FST_DEVICE_BLOCK_NOT_FOUND = 3L, 28 FST_INVALID_VERSION = 4L, 29 FST_DEVICE_IS_STARTED = 5L, 30 FST_DEVICE_IS_STOPPED = 6L, 31 FST_FIFO_ERROR = 7L, /* An error occurred during an \ 32 operation with a FIFO such as \ 33 an underrun or overrun, this \ 34 error requires the device to \ 35 be reset */ 36 FST_RESET_ERROR = 8L, /* An error occurred which requires \ 37 the device to be reset */ 38 FST_DMA_ERROR = 9L, /* A DMA error occurred, this error \ 39 typically requires the device \ 40 using the DMA to be reset */ 41 FST_NOT_POLLED = 10L, /* The device is not configured for \ 42 polled mode operation */ 43 FST_FIFO_NO_ROOM = 11L, /* A FIFO did not have room to put \ 44 the specified data into */ 45 FST_BUFFER_TOO_SMALL = 12L, /* The buffer is not large enough \ 46 to hold the expected data */ 47 FST_NO_DATA = 13L, /* There was no data available */ 48 FST_REGISTER_ERROR = 14L, /* A register did not contain the \ 49 expected value */ 50 FST_INVALID_PARAM = 15L, /* An invalid parameter was passed \ 51 into the function */ 52 FST_NOT_SGDMA = 16L, /* The device is not configured for \ 53 scatter-gather DMA operation */ 54 FST_LOOPBACK_ERROR = 17L, /* A loopback test failed */ 55 FST_NO_CALLBACK = 18L, /* A callback has not yet been \ 56 registered */ 57 FST_NO_FEATURE = 19L, /* Device is not configured with \ 58 the requested feature */ 59 FST_NOT_INTERRUPT = 20L, /* Device is not configured for \ 60 interrupt mode operation */ 61 FST_DEVICE_BUSY = 21L, /* Device is busy */ 62 FST_ERROR_COUNT_MAX = 22L, /* The error counters of a device \ 63 have maxed out */ 64 FST_IS_STARTED = 23L, /* Used when part of device is \ 65 already started i.e. \ 66 sub channel */ 67 FST_IS_STOPPED = 24L, /* Used when part of device is \ 68 already stopped i.e. \ 69 sub channel */ 70 FST_DATA_LOST = 26L, /* Driver defined error */ 71 FST_RECV_ERROR = 27L, /* Generic receive error */ 72 FST_SEND_ERROR = 28L, /* Generic transmit error */ 73 FST_NOT_ENABLED = 29L, /* A requested service is not \ 74 available because it has not \ 75 been enabled */ 76 FST_ASSERT_RETURN = 30L, /* Assert occurs defined error */ 77 FST_TIMEOUT = 31L, 78 FST_EILSEQ = 32L, /* Illegal byte sequence. */ 79 FST_STATUS_MAX_VALUE = 0xffff /* Status max value */ 80 } Common_status; 81 82 #endif // !FT_STATUS_H 83