PIR grove sensor that sends the sensed data to Thingspeak.com through the wifi module ESP 8266

Dependencies:   mbed

Committer:
skrawool
Date:
Mon Dec 05 16:39:27 2016 +0000
Revision:
0:3954a906acc2
PIR grove sensor that sends the sensed data to thingspeak through the wifi module ESP 8266

Who changed what in which revision?

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