mbed-os5 only for TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Committer:
kenjiArai
Date:
Tue Dec 31 06:02:27 2019 +0000
Revision:
1:9db0e321a9f4
Parent:
0:5b88d5760320
updated based on mbed-os5.15.0

Who changed what in which revision?

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