Development mbed library for MAX32630FTHR

Dependents:   blinky_max32630fthr

Committer:
switches
Date:
Fri Dec 16 16:27:57 2016 +0000
Revision:
3:1198227e6421
Parent:
0:5c4d7b2438d3
Changed ADC scale for MAX32625 platforms to 1.2V full scale to match MAX32630 platforms

Who changed what in which revision?

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