Home Alert System

Dependencies:   PWM_Tone_Library DHT

Committer:
aziz111
Date:
Fri Mar 08 17:15:02 2019 +0000
Revision:
5:569a4894abc1
Parent:
3:78f223d34f36
Final

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ethaderu 3:78f223d34f36 1 /* mbed Microcontroller Library
ethaderu 3:78f223d34f36 2 * Copyright (c) 2006-2015 ARM Limited
ethaderu 3:78f223d34f36 3 *
ethaderu 3:78f223d34f36 4 * Licensed under the Apache License, Version 2.0 (the "License");
ethaderu 3:78f223d34f36 5 * you may not use this file except in compliance with the License.
ethaderu 3:78f223d34f36 6 * You may obtain a copy of the License at
ethaderu 3:78f223d34f36 7 *
ethaderu 3:78f223d34f36 8 * http://www.apache.org/licenses/LICENSE-2.0
ethaderu 3:78f223d34f36 9 *
ethaderu 3:78f223d34f36 10 * Unless required by applicable law or agreed to in writing, software
ethaderu 3:78f223d34f36 11 * distributed under the License is distributed on an "AS IS" BASIS,
ethaderu 3:78f223d34f36 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ethaderu 3:78f223d34f36 13 * See the License for the specific language governing permissions and
ethaderu 3:78f223d34f36 14 * limitations under the License.
ethaderu 3:78f223d34f36 15 */
ethaderu 3:78f223d34f36 16 #ifndef MBED_US_TICKER_API_H
ethaderu 3:78f223d34f36 17 #define MBED_US_TICKER_API_H
ethaderu 3:78f223d34f36 18
ethaderu 3:78f223d34f36 19 #include <stdint.h>
ethaderu 3:78f223d34f36 20 #include "ticker_api.h"
ethaderu 3:78f223d34f36 21
ethaderu 3:78f223d34f36 22 #ifdef __cplusplus
ethaderu 3:78f223d34f36 23 extern "C" {
ethaderu 3:78f223d34f36 24 #endif
ethaderu 3:78f223d34f36 25
ethaderu 3:78f223d34f36 26 /**
ethaderu 3:78f223d34f36 27 * \defgroup UsTicker Microseconds Ticker Functions
ethaderu 3:78f223d34f36 28 * @{
ethaderu 3:78f223d34f36 29 */
ethaderu 3:78f223d34f36 30
ethaderu 3:78f223d34f36 31 /** Get ticker's data
ethaderu 3:78f223d34f36 32 *
ethaderu 3:78f223d34f36 33 * @return The low power ticker data
ethaderu 3:78f223d34f36 34 */
ethaderu 3:78f223d34f36 35 const ticker_data_t* get_us_ticker_data(void);
ethaderu 3:78f223d34f36 36
ethaderu 3:78f223d34f36 37
ethaderu 3:78f223d34f36 38 /** The wrapper for ticker_irq_handler, to pass us ticker's data
ethaderu 3:78f223d34f36 39 *
ethaderu 3:78f223d34f36 40 */
ethaderu 3:78f223d34f36 41 void us_ticker_irq_handler(void);
ethaderu 3:78f223d34f36 42
ethaderu 3:78f223d34f36 43 /* HAL us ticker */
ethaderu 3:78f223d34f36 44
ethaderu 3:78f223d34f36 45 /** Initialize the ticker
ethaderu 3:78f223d34f36 46 *
ethaderu 3:78f223d34f36 47 */
ethaderu 3:78f223d34f36 48 void us_ticker_init(void);
ethaderu 3:78f223d34f36 49
ethaderu 3:78f223d34f36 50 /** Read the current counter
ethaderu 3:78f223d34f36 51 *
ethaderu 3:78f223d34f36 52 * @return The current timer's counter value in microseconds
ethaderu 3:78f223d34f36 53 */
ethaderu 3:78f223d34f36 54 uint32_t us_ticker_read(void);
ethaderu 3:78f223d34f36 55
ethaderu 3:78f223d34f36 56 /** Set interrupt for specified timestamp
ethaderu 3:78f223d34f36 57 *
ethaderu 3:78f223d34f36 58 * @param timestamp The time in microseconds to be set
ethaderu 3:78f223d34f36 59 */
ethaderu 3:78f223d34f36 60 void us_ticker_set_interrupt(timestamp_t timestamp);
ethaderu 3:78f223d34f36 61
ethaderu 3:78f223d34f36 62 /** Disable us ticker interrupt
ethaderu 3:78f223d34f36 63 *
ethaderu 3:78f223d34f36 64 */
ethaderu 3:78f223d34f36 65 void us_ticker_disable_interrupt(void);
ethaderu 3:78f223d34f36 66
ethaderu 3:78f223d34f36 67 /** Clear us ticker interrupt
ethaderu 3:78f223d34f36 68 *
ethaderu 3:78f223d34f36 69 */
ethaderu 3:78f223d34f36 70 void us_ticker_clear_interrupt(void);
ethaderu 3:78f223d34f36 71
ethaderu 3:78f223d34f36 72 /**@}*/
ethaderu 3:78f223d34f36 73
ethaderu 3:78f223d34f36 74 #ifdef __cplusplus
ethaderu 3:78f223d34f36 75 }
ethaderu 3:78f223d34f36 76 #endif
ethaderu 3:78f223d34f36 77
ethaderu 3:78f223d34f36 78 #endif