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