
2020_09_07_AD7190_LoRa
TIME_AD.h@0:0e20215b178e, 2020-08-06 (annotated)
- Committer:
- peng103617
- Date:
- Thu Aug 06 06:52:19 2020 +0000
- Revision:
- 0:0e20215b178e
AD7190_LoRa
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
peng103617 | 0:0e20215b178e | 1 | /***************************************************************************//** |
peng103617 | 0:0e20215b178e | 2 | * @file TIME_AD.h |
peng103617 | 0:0e20215b178e | 3 | * @brief Header file of TIME Driver. |
peng103617 | 0:0e20215b178e | 4 | * @author DNechita (Dan.Nechita@analog.com) |
peng103617 | 0:0e20215b178e | 5 | ******************************************************************************** |
peng103617 | 0:0e20215b178e | 6 | * Copyright 2012(c) Analog Devices, Inc. |
peng103617 | 0:0e20215b178e | 7 | * |
peng103617 | 0:0e20215b178e | 8 | * All rights reserved. |
peng103617 | 0:0e20215b178e | 9 | * |
peng103617 | 0:0e20215b178e | 10 | * Redistribution and use in source and binary forms, with or without |
peng103617 | 0:0e20215b178e | 11 | * modification, are permitted provided that the following conditions are met: |
peng103617 | 0:0e20215b178e | 12 | * - Redistributions of source code must retain the above copyright |
peng103617 | 0:0e20215b178e | 13 | * notice, this list of conditions and the following disclaimer. |
peng103617 | 0:0e20215b178e | 14 | * - Redistributions in binary form must reproduce the above copyright |
peng103617 | 0:0e20215b178e | 15 | * notice, this list of conditions and the following disclaimer in |
peng103617 | 0:0e20215b178e | 16 | * the documentation and/or other materials provided with the |
peng103617 | 0:0e20215b178e | 17 | * distribution. |
peng103617 | 0:0e20215b178e | 18 | * - Neither the name of Analog Devices, Inc. nor the names of its |
peng103617 | 0:0e20215b178e | 19 | * contributors may be used to endorse or promote products derived |
peng103617 | 0:0e20215b178e | 20 | * from this software without specific prior written permission. |
peng103617 | 0:0e20215b178e | 21 | * - The use of this software may or may not infringe the patent rights |
peng103617 | 0:0e20215b178e | 22 | * of one or more patent holders. This license does not release you |
peng103617 | 0:0e20215b178e | 23 | * from the requirement that you obtain separate licenses from these |
peng103617 | 0:0e20215b178e | 24 | * patent holders to use this software. |
peng103617 | 0:0e20215b178e | 25 | * - Use of the software either in source or binary form, must be run |
peng103617 | 0:0e20215b178e | 26 | * on or directly connected to an Analog Devices Inc. component. |
peng103617 | 0:0e20215b178e | 27 | * |
peng103617 | 0:0e20215b178e | 28 | * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR |
peng103617 | 0:0e20215b178e | 29 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
peng103617 | 0:0e20215b178e | 30 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
peng103617 | 0:0e20215b178e | 31 | * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, |
peng103617 | 0:0e20215b178e | 32 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
peng103617 | 0:0e20215b178e | 33 | * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR |
peng103617 | 0:0e20215b178e | 34 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
peng103617 | 0:0e20215b178e | 35 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
peng103617 | 0:0e20215b178e | 36 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
peng103617 | 0:0e20215b178e | 37 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
peng103617 | 0:0e20215b178e | 38 | * |
peng103617 | 0:0e20215b178e | 39 | *******************************************************************************/ |
peng103617 | 0:0e20215b178e | 40 | #ifndef __TIME_AD_H__ |
peng103617 | 0:0e20215b178e | 41 | #define __TIME_AD_H__ |
peng103617 | 0:0e20215b178e | 42 | /******************************************************************************/ |
peng103617 | 0:0e20215b178e | 43 | /************************ Functions Declarations ******************************/ |
peng103617 | 0:0e20215b178e | 44 | /******************************************************************************/ |
peng103617 | 0:0e20215b178e | 45 | |
peng103617 | 0:0e20215b178e | 46 | /*! Initializes the timer used in this driver. */ |
peng103617 | 0:0e20215b178e | 47 | unsigned char TIME_Init(void); |
peng103617 | 0:0e20215b178e | 48 | |
peng103617 | 0:0e20215b178e | 49 | /*! The timer begins to count in steps of microseconds(us) until the user calls a |
peng103617 | 0:0e20215b178e | 50 | stop measurement function. */ |
peng103617 | 0:0e20215b178e | 51 | void TIME_StartMeasure(void); |
peng103617 | 0:0e20215b178e | 52 | |
peng103617 | 0:0e20215b178e | 53 | /*! Stops the measurement process when the functions is called. */ |
peng103617 | 0:0e20215b178e | 54 | unsigned long TIME_StopMeasure(void); |
peng103617 | 0:0e20215b178e | 55 | |
peng103617 | 0:0e20215b178e | 56 | /*! Creates a delay of microseconds. */ |
peng103617 | 0:0e20215b178e | 57 | void TIME_DelayUs(unsigned short usUnits); |
peng103617 | 0:0e20215b178e | 58 | |
peng103617 | 0:0e20215b178e | 59 | /*! Creates a delay of milliseconds. */ |
peng103617 | 0:0e20215b178e | 60 | void TIME_DelayMs(unsigned short msUnits); |
peng103617 | 0:0e20215b178e | 61 | |
peng103617 | 0:0e20215b178e | 62 | #endif // __TIME_AD_H__ |