inport from local

Dependents:   Hobbyking_Cheetah_0511

Committer:
NYX
Date:
Mon Mar 16 06:35:48 2020 +0000
Revision:
0:85b3fd62ea1a
reinport to mbed;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
NYX 0:85b3fd62ea1a 1
NYX 0:85b3fd62ea1a 2 /** \addtogroup hal */
NYX 0:85b3fd62ea1a 3 /** @{*/
NYX 0:85b3fd62ea1a 4 /*
NYX 0:85b3fd62ea1a 5 * Copyright (c) 2006-2016, ARM Limited, All Rights Reserved
NYX 0:85b3fd62ea1a 6 * SPDX-License-Identifier: Apache-2.0
NYX 0:85b3fd62ea1a 7 *
NYX 0:85b3fd62ea1a 8 * Licensed under the Apache License, Version 2.0 (the "License"); you may
NYX 0:85b3fd62ea1a 9 * not use this file except in compliance with the License.
NYX 0:85b3fd62ea1a 10 * You may obtain a copy of the License at
NYX 0:85b3fd62ea1a 11 *
NYX 0:85b3fd62ea1a 12 * http://www.apache.org/licenses/LICENSE-2.0
NYX 0:85b3fd62ea1a 13 *
NYX 0:85b3fd62ea1a 14 * Unless required by applicable law or agreed to in writing, software
NYX 0:85b3fd62ea1a 15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
NYX 0:85b3fd62ea1a 16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
NYX 0:85b3fd62ea1a 17 * See the License for the specific language governing permissions and
NYX 0:85b3fd62ea1a 18 * limitations under the License.
NYX 0:85b3fd62ea1a 19 */
NYX 0:85b3fd62ea1a 20
NYX 0:85b3fd62ea1a 21 #ifndef __DRIVER_COMMON_H
NYX 0:85b3fd62ea1a 22 #define __DRIVER_COMMON_H
NYX 0:85b3fd62ea1a 23
NYX 0:85b3fd62ea1a 24 #include <stddef.h>
NYX 0:85b3fd62ea1a 25 #include <stdint.h>
NYX 0:85b3fd62ea1a 26 #include <stdbool.h>
NYX 0:85b3fd62ea1a 27
NYX 0:85b3fd62ea1a 28 /****** This file has been deprecated since mbed-os-5.5 *****/
NYX 0:85b3fd62ea1a 29
NYX 0:85b3fd62ea1a 30 #define ARM_DRIVER_VERSION_MAJOR_MINOR(major,minor) (((major) << 8) | (minor))
NYX 0:85b3fd62ea1a 31
NYX 0:85b3fd62ea1a 32 /**
NYX 0:85b3fd62ea1a 33 \brief Driver Version
NYX 0:85b3fd62ea1a 34 */
NYX 0:85b3fd62ea1a 35 typedef struct _ARM_DRIVER_VERSION {
NYX 0:85b3fd62ea1a 36 uint16_t api; ///< API version
NYX 0:85b3fd62ea1a 37 uint16_t drv; ///< Driver version
NYX 0:85b3fd62ea1a 38 } ARM_DRIVER_VERSION;
NYX 0:85b3fd62ea1a 39
NYX 0:85b3fd62ea1a 40 /* General return codes */
NYX 0:85b3fd62ea1a 41 #define ARM_DRIVER_OK 0 ///< Operation succeeded
NYX 0:85b3fd62ea1a 42 #define ARM_DRIVER_ERROR -1 ///< Unspecified error
NYX 0:85b3fd62ea1a 43 #define ARM_DRIVER_ERROR_BUSY -2 ///< Driver is busy
NYX 0:85b3fd62ea1a 44 #define ARM_DRIVER_ERROR_TIMEOUT -3 ///< Timeout occurred
NYX 0:85b3fd62ea1a 45 #define ARM_DRIVER_ERROR_UNSUPPORTED -4 ///< Operation not supported
NYX 0:85b3fd62ea1a 46 #define ARM_DRIVER_ERROR_PARAMETER -5 ///< Parameter error
NYX 0:85b3fd62ea1a 47 #define ARM_DRIVER_ERROR_SPECIFIC -6 ///< Start of driver specific errors
NYX 0:85b3fd62ea1a 48
NYX 0:85b3fd62ea1a 49 /**
NYX 0:85b3fd62ea1a 50 \brief General power states
NYX 0:85b3fd62ea1a 51 */
NYX 0:85b3fd62ea1a 52 typedef enum _ARM_POWER_STATE {
NYX 0:85b3fd62ea1a 53 ARM_POWER_OFF, ///< Power off: no operation possible
NYX 0:85b3fd62ea1a 54 ARM_POWER_LOW, ///< Low Power mode: retain state, detect and signal wake-up events
NYX 0:85b3fd62ea1a 55 ARM_POWER_FULL ///< Power on: full operation at maximum performance
NYX 0:85b3fd62ea1a 56 } ARM_POWER_STATE;
NYX 0:85b3fd62ea1a 57
NYX 0:85b3fd62ea1a 58 #endif /* __DRIVER_COMMON_H */
NYX 0:85b3fd62ea1a 59
NYX 0:85b3fd62ea1a 60 /** @}*/