Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Driver_Common.h
00001 /* 00002 * Copyright (c) 2013-2017 ARM Limited. All rights reserved. 00003 * 00004 * SPDX-License-Identifier: Apache-2.0 00005 * 00006 * Licensed under the Apache License, Version 2.0 (the License); you may 00007 * not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 00014 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 * 00018 * $Date: 2. Feb 2017 00019 * $Revision: V2.0 00020 * 00021 * Project: Common Driver definitions 00022 */ 00023 00024 /* History: 00025 * Version 2.0 00026 * Changed prefix ARM_DRV -> ARM_DRIVER 00027 * Added General return codes definitions 00028 * Version 1.10 00029 * Namespace prefix ARM_ added 00030 * Version 1.00 00031 * Initial release 00032 */ 00033 00034 #ifndef DRIVER_COMMON_H_ 00035 #define DRIVER_COMMON_H_ 00036 00037 #include <stddef.h> 00038 #include <stdint.h> 00039 #include <stdbool.h> 00040 00041 #define ARM_DRIVER_VERSION_MAJOR_MINOR(major,minor) (((major) << 8) | (minor)) 00042 00043 /** 00044 \brief Driver Version 00045 */ 00046 typedef struct _ARM_DRIVER_VERSION { 00047 uint16_t api; ///< API version 00048 uint16_t drv; ///< Driver version 00049 } ARM_DRIVER_VERSION; 00050 00051 /* General return codes */ 00052 #define ARM_DRIVER_OK 0 ///< Operation succeeded 00053 #define ARM_DRIVER_ERROR -1 ///< Unspecified error 00054 #define ARM_DRIVER_ERROR_BUSY -2 ///< Driver is busy 00055 #define ARM_DRIVER_ERROR_TIMEOUT -3 ///< Timeout occurred 00056 #define ARM_DRIVER_ERROR_UNSUPPORTED -4 ///< Operation not supported 00057 #define ARM_DRIVER_ERROR_PARAMETER -5 ///< Parameter error 00058 #define ARM_DRIVER_ERROR_SPECIFIC -6 ///< Start of driver specific errors 00059 00060 /** 00061 \brief General power states 00062 */ 00063 typedef enum _ARM_POWER_STATE { 00064 ARM_POWER_OFF, ///< Power off: no operation possible 00065 ARM_POWER_LOW, ///< Low Power mode: retain state, detect and signal wake-up events 00066 ARM_POWER_FULL ///< Power on: full operation at maximum performance 00067 } ARM_POWER_STATE; 00068 00069 #endif /* DRIVER_COMMON_H_ */
Generated on Tue Jul 12 2022 15:37:15 by
