Erste version der Software für der Prototyp

Committer:
borlanic
Date:
Fri Mar 30 14:07:05 2018 +0000
Revision:
4:75df35ef4fb6
Parent:
0:380207fcb5c1
commentar

Who changed what in which revision?

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