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