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

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.