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