temp

Dependencies:   mbed SDFileSystem MS5607 ADXL345_I2C FATFileSystem

Committer:
IKobayashi
Date:
Mon Mar 16 23:37:42 2020 +0900
Revision:
0:c88c3b616c00
copy

Who changed what in which revision?

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