BLE ADV sensor for 2-pin interrupt (i.e. window/door sensor w/ reed switch)

Dependencies:   BLE_API mbed nRF51822

Basic door/window sensor for nRF51822 BLE modules.

Committer:
electronichamsters
Date:
Sun Aug 27 05:48:45 2017 +0000
Revision:
12:9bb01e063498
Parent:
5:f4d74a8cad43
make periodic updates based on i/o events.  comments.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rgrover1 5:f4d74a8cad43 1 /* mbed Microcontroller Library
rgrover1 5:f4d74a8cad43 2 * Copyright (c) 2006-2015 ARM Limited
rgrover1 5:f4d74a8cad43 3 *
rgrover1 5:f4d74a8cad43 4 * Licensed under the Apache License, Version 2.0 (the "License");
rgrover1 5:f4d74a8cad43 5 * you may not use this file except in compliance with the License.
rgrover1 5:f4d74a8cad43 6 * You may obtain a copy of the License at
rgrover1 5:f4d74a8cad43 7 *
rgrover1 5:f4d74a8cad43 8 * http://www.apache.org/licenses/LICENSE-2.0
rgrover1 5:f4d74a8cad43 9 *
rgrover1 5:f4d74a8cad43 10 * Unless required by applicable law or agreed to in writing, software
rgrover1 5:f4d74a8cad43 11 * distributed under the License is distributed on an "AS IS" BASIS,
rgrover1 5:f4d74a8cad43 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rgrover1 5:f4d74a8cad43 13 * See the License for the specific language governing permissions and
rgrover1 5:f4d74a8cad43 14 * limitations under the License.
rgrover1 5:f4d74a8cad43 15 */
rgrover1 5:f4d74a8cad43 16
rgrover1 5:f4d74a8cad43 17 #ifndef TMP_NRF51_H
rgrover1 5:f4d74a8cad43 18 #define TMP_NRF51_H
rgrover1 5:f4d74a8cad43 19
rgrover1 5:f4d74a8cad43 20 #include "mbed.h"
rgrover1 5:f4d74a8cad43 21
rgrover1 5:f4d74a8cad43 22 //!Library for the nrf51822 internal temperature sensor.
rgrover1 5:f4d74a8cad43 23
rgrover1 5:f4d74a8cad43 24 class TMP_nrf51
rgrover1 5:f4d74a8cad43 25 {
rgrover1 5:f4d74a8cad43 26 public:
rgrover1 5:f4d74a8cad43 27 typedef float TempSensorValue_t;
rgrover1 5:f4d74a8cad43 28
rgrover1 5:f4d74a8cad43 29 /**
rgrover1 5:f4d74a8cad43 30 * @brief Get the temperature value.
rgrover1 5:f4d74a8cad43 31 *
rgrover1 5:f4d74a8cad43 32 * @return Die temperature in °C.
rgrover1 5:f4d74a8cad43 33 */
rgrover1 5:f4d74a8cad43 34 TempSensorValue_t get(void);
rgrover1 5:f4d74a8cad43 35 };
rgrover1 5:f4d74a8cad43 36
rgrover1 5:f4d74a8cad43 37 #endif