mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-14 22:18:14 +08:00
89 lines
4.4 KiB
C
89 lines
4.4 KiB
C
/**
|
|
******************************************************************************
|
|
* @file mico_result.h
|
|
* @author You xx
|
|
* @version V1.0.0
|
|
* @date 28-Nov-2016
|
|
* @brief This file provides error code of FILESYSTEM.
|
|
******************************************************************************
|
|
*
|
|
* The MIT License
|
|
* Copyright (c) 2014 MXCHIP Inc.
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is furnished
|
|
* to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
******************************************************************************
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/******************************************************
|
|
* @cond Macros
|
|
******************************************************/
|
|
|
|
#ifndef RESULT_ENUM
|
|
#define RESULT_ENUM( prefix, name, value ) prefix ## name = (value)
|
|
#endif /* ifndef RESULT_ENUM */
|
|
|
|
#define FILESYSTEM_RESULT_LIST( prefix ) \
|
|
RESULT_ENUM( prefix, SUCCESS, 0 ), /**< Success */ \
|
|
RESULT_ENUM( prefix, PENDING, 1 ), /**< Pending */ \
|
|
RESULT_ENUM( prefix, TIMEOUT, 2 ), /**< Timeout */ \
|
|
RESULT_ENUM( prefix, PARTIAL_RESULTS, 3 ), /**< Partial results */ \
|
|
RESULT_ENUM( prefix, ERROR, 4 ), /**< Error */ \
|
|
RESULT_ENUM( prefix, BADARG, 5 ), /**< Bad Arguments */ \
|
|
RESULT_ENUM( prefix, BADOPTION, 6 ), /**< Mode not supported */ \
|
|
RESULT_ENUM( prefix, UNSUPPORTED, 7 ), /**< Unsupported function */ \
|
|
RESULT_ENUM( prefix, DISK_ERROR, 10008 ), /**< Low level error accessing media */ \
|
|
RESULT_ENUM( prefix, PATH_NOT_FOUND, 10009 ), /**< Path was not found in filesystem */ \
|
|
RESULT_ENUM( prefix, MEDIA_NOT_READY, 10010 ), /**< Media is not present or ready for access */ \
|
|
RESULT_ENUM( prefix, ACCESS_DENIED, 10011 ), /**< Access denied due to permissions */ \
|
|
RESULT_ENUM( prefix, WRITE_PROTECTED, 10012 ), /**< Media is write protected */ \
|
|
RESULT_ENUM( prefix, OUT_OF_SPACE, 10013 ), /**< No free space left on media */ \
|
|
RESULT_ENUM( prefix, FILENAME_BUFFER_TOO_SMALL, 10014 ), /**< Filename buffer was too small when retrieving directory contents */ \
|
|
RESULT_ENUM( prefix, END_OF_RESOURCE, 10015 ), /**< End of file/directory reached */ \
|
|
RESULT_ENUM( prefix, FILESYSTEM_INVALID, 10016 ), /**< Filesystem has an unrecoverable error */ \
|
|
RESULT_ENUM( prefix, BLOCK_SIZE_BAD, 10017 ), /**< Block size is invalid - not a multiple or sub-multiple of DEFAULT_SECTOR_SIZE */
|
|
|
|
/******************************************************
|
|
* @endcond Enumerations
|
|
******************************************************/
|
|
|
|
/**
|
|
* WICED Result Type
|
|
*/
|
|
typedef enum
|
|
{
|
|
FILESYSTEM_RESULT_LIST( MICO_FILESYSTEM_ ) /* 10000 - 10999 */
|
|
} mico_result_t;
|
|
|
|
/******************************************************
|
|
* Structures
|
|
******************************************************/
|
|
|
|
/******************************************************
|
|
* Function Declarations
|
|
******************************************************/
|
|
|
|
#ifdef __cplusplus
|
|
} /*extern "C" */
|
|
#endif
|