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