forked
Embed:
(wiki syntax)
Show/hide line numbers
Driver_Common.h
00001 00002 /** \addtogroup hal */ 00003 /** @{*/ 00004 /* 00005 * Copyright (c) 2006-2016, ARM Limited, All Rights Reserved 00006 * SPDX-License-Identifier: Apache-2.0 00007 * 00008 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00009 * not use this file except in compliance with the License. 00010 * You may obtain a copy of the License at 00011 * 00012 * http://www.apache.org/licenses/LICENSE-2.0 00013 * 00014 * Unless required by applicable law or agreed to in writing, software 00015 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00016 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00017 * See the License for the specific language governing permissions and 00018 * limitations under the License. 00019 */ 00020 00021 #ifndef __DRIVER_COMMON_H 00022 #define __DRIVER_COMMON_H 00023 00024 #include <stddef.h> 00025 #include <stdint.h> 00026 #include <stdbool.h> 00027 00028 /****** This file has been deprecated since mbed-os-5.5 *****/ 00029 00030 #define ARM_DRIVER_VERSION_MAJOR_MINOR(major,minor) (((major) << 8) | (minor)) 00031 00032 /** 00033 \brief Driver Version 00034 */ 00035 typedef struct _ARM_DRIVER_VERSION { 00036 uint16_t api; ///< API version 00037 uint16_t drv; ///< Driver version 00038 } ARM_DRIVER_VERSION; 00039 00040 /* General return codes */ 00041 #define ARM_DRIVER_OK 0 ///< Operation succeeded 00042 #define ARM_DRIVER_ERROR -1 ///< Unspecified error 00043 #define ARM_DRIVER_ERROR_BUSY -2 ///< Driver is busy 00044 #define ARM_DRIVER_ERROR_TIMEOUT -3 ///< Timeout occurred 00045 #define ARM_DRIVER_ERROR_UNSUPPORTED -4 ///< Operation not supported 00046 #define ARM_DRIVER_ERROR_PARAMETER -5 ///< Parameter error 00047 #define ARM_DRIVER_ERROR_SPECIFIC -6 ///< Start of driver specific errors 00048 00049 /** 00050 \brief General power states 00051 */ 00052 typedef enum _ARM_POWER_STATE { 00053 ARM_POWER_OFF, ///< Power off: no operation possible 00054 ARM_POWER_LOW, ///< Low Power mode: retain state, detect and signal wake-up events 00055 ARM_POWER_FULL ///< Power on: full operation at maximum performance 00056 } ARM_POWER_STATE; 00057 00058 #endif /* __DRIVER_COMMON_H */ 00059 00060 /** @}*/
Generated on Tue Jul 12 2022 16:02:32 by 1.7.2