Rohan Gurav
/
Sean_AdiSense1000_V21
ADISense1000 Version 2.1 code base
Fork of AdiSense1000_V21 by
src/mbed/adi_sense_time.cpp@26:12d0204be712, 2018-03-26 (annotated)
- Committer:
- danodonovan
- Date:
- Mon Mar 26 14:50:05 2018 +0000
- Revision:
- 26:12d0204be712
- Child:
- 27:567abf893938
Adding files missed in previous commit for v1.0.2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
danodonovan | 26:12d0204be712 | 1 | /*! |
danodonovan | 26:12d0204be712 | 2 | ****************************************************************************** |
danodonovan | 26:12d0204be712 | 3 | * @file: adi_sense_time.cpp |
danodonovan | 26:12d0204be712 | 4 | * @brief: ADISENSE OS-dependent wrapper layer for time functions |
danodonovan | 26:12d0204be712 | 5 | *----------------------------------------------------------------------------- |
danodonovan | 26:12d0204be712 | 6 | */ |
danodonovan | 26:12d0204be712 | 7 | |
danodonovan | 26:12d0204be712 | 8 | /****************************************************************************** |
danodonovan | 26:12d0204be712 | 9 | Copyright 2017 (c) Analog Devices, Inc. |
danodonovan | 26:12d0204be712 | 10 | |
danodonovan | 26:12d0204be712 | 11 | All rights reserved. |
danodonovan | 26:12d0204be712 | 12 | |
danodonovan | 26:12d0204be712 | 13 | Redistribution and use in source and binary forms, with or without |
danodonovan | 26:12d0204be712 | 14 | modification, are permitted provided that the following conditions are met: |
danodonovan | 26:12d0204be712 | 15 | - Redistributions of source code must retain the above copyright |
danodonovan | 26:12d0204be712 | 16 | notice, this list of conditions and the following disclaimer. |
danodonovan | 26:12d0204be712 | 17 | - Redistributions in binary form must reproduce the above copyright |
danodonovan | 26:12d0204be712 | 18 | notice, this list of conditions and the following disclaimer in |
danodonovan | 26:12d0204be712 | 19 | the documentation and/or other materials provided with the |
danodonovan | 26:12d0204be712 | 20 | distribution. |
danodonovan | 26:12d0204be712 | 21 | - Neither the name of Analog Devices, Inc. nor the names of its |
danodonovan | 26:12d0204be712 | 22 | contributors may be used to endorse or promote products derived |
danodonovan | 26:12d0204be712 | 23 | from this software without specific prior written permission. |
danodonovan | 26:12d0204be712 | 24 | - The use of this software may or may not infringe the patent rights |
danodonovan | 26:12d0204be712 | 25 | of one or more patent holders. This license does not release you |
danodonovan | 26:12d0204be712 | 26 | from the requirement that you obtain separate licenses from these |
danodonovan | 26:12d0204be712 | 27 | patent holders to use this software. |
danodonovan | 26:12d0204be712 | 28 | - Use of the software either in source or binary form, must be run |
danodonovan | 26:12d0204be712 | 29 | on or directly connected to an Analog Devices Inc. component. |
danodonovan | 26:12d0204be712 | 30 | |
danodonovan | 26:12d0204be712 | 31 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR |
danodonovan | 26:12d0204be712 | 32 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
danodonovan | 26:12d0204be712 | 33 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
danodonovan | 26:12d0204be712 | 34 | IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, |
danodonovan | 26:12d0204be712 | 35 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
danodonovan | 26:12d0204be712 | 36 | LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR |
danodonovan | 26:12d0204be712 | 37 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
danodonovan | 26:12d0204be712 | 38 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
danodonovan | 26:12d0204be712 | 39 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
danodonovan | 26:12d0204be712 | 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
danodonovan | 26:12d0204be712 | 41 | * |
danodonovan | 26:12d0204be712 | 42 | *****************************************************************************/ |
danodonovan | 26:12d0204be712 | 43 | |
danodonovan | 26:12d0204be712 | 44 | #include <mbed.h> |
danodonovan | 26:12d0204be712 | 45 | |
danodonovan | 26:12d0204be712 | 46 | #include "inc/adi_sense_time.h" |
danodonovan | 26:12d0204be712 | 47 | |
danodonovan | 26:12d0204be712 | 48 | #ifdef __cplusplus |
danodonovan | 26:12d0204be712 | 49 | extern "C" { |
danodonovan | 26:12d0204be712 | 50 | #endif |
danodonovan | 26:12d0204be712 | 51 | |
danodonovan | 26:12d0204be712 | 52 | /* |
danodonovan | 26:12d0204be712 | 53 | * Wait for a specified number of microseconds |
danodonovan | 26:12d0204be712 | 54 | */ |
danodonovan | 26:12d0204be712 | 55 | void adi_sense_TimeDelayUsec( |
danodonovan | 26:12d0204be712 | 56 | const unsigned microseconds) |
danodonovan | 26:12d0204be712 | 57 | { |
danodonovan | 26:12d0204be712 | 58 | wait_us(microseconds); |
danodonovan | 26:12d0204be712 | 59 | } |
danodonovan | 26:12d0204be712 | 60 | |
danodonovan | 26:12d0204be712 | 61 | #ifdef __cplusplus |
danodonovan | 26:12d0204be712 | 62 | } |
danodonovan | 26:12d0204be712 | 63 | #endif |
danodonovan | 26:12d0204be712 | 64 |