Lin Team / Mbed 2 deprecated AD7190_LoRa

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TIME_AD.cpp Source File

TIME_AD.cpp

00001 /***************************************************************************//**
00002  *   @file   TIME_AD.c
00003  *   @brief  Implementation of TIME Driver.
00004  *   @author Dan Nechita
00005 ********************************************************************************
00006  * Copyright 2012(c) Analog Devices, Inc.
00007  *
00008  * All rights reserved.
00009  *
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions are met:
00012  *  - Redistributions of source code must retain the above copyright
00013  *    notice, this list of conditions and the following disclaimer.
00014  *  - Redistributions in binary form must reproduce the above copyright
00015  *    notice, this list of conditions and the following disclaimer in
00016  *    the documentation and/or other materials provided with the
00017  *    distribution.
00018  *  - Neither the name of Analog Devices, Inc. nor the names of its
00019  *    contributors may be used to endorse or promote products derived
00020  *    from this software without specific prior written permission.
00021  *  - The use of this software may or may not infringe the patent rights
00022  *    of one or more patent holders.  This license does not release you
00023  *    from the requirement that you obtain separate licenses from these
00024  *    patent holders to use this software.
00025  *  - Use of the software either in source or binary form, must be run
00026  *    on or directly connected to an Analog Devices Inc. component.
00027  *
00028  * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
00029  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
00030  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00031  * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
00032  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00033  * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
00034  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038  *
00039 *******************************************************************************/
00040 
00041 /******************************************************************************/
00042 /***************************** Include Files **********************************/
00043 /******************************************************************************/
00044 #include "TIME_AD.h"
00045 #include "mbed.h"
00046 /******************************************************************************/
00047 /************************ Variables Declarations ******************************/
00048 /******************************************************************************/
00049 
00050 
00051 /******************************************************************************/
00052 /************************ Functions Definitions *******************************/
00053 /******************************************************************************/
00054 
00055 /***************************************************************************//**
00056  * @brief Initializes the timer used in this driver.
00057  *
00058  * @return status - Result of the initialization procedure.
00059  *                  Example: 1 - if initialization was successful;
00060  *                           0 - if initialization was unsuccessful.
00061 *******************************************************************************/
00062 unsigned char TIME_Init(void)
00063 {
00064     // Add your code here.
00065     return 1;
00066 }
00067 
00068 /***************************************************************************//**
00069  * @brief The timer begins to count in steps of microseconds(us) until the user
00070  *        calls a stop measurement function.
00071  *
00072  * @return None.
00073 *******************************************************************************/
00074 void TIME_StartMeasure(void)
00075 {
00076     // Add your code here.
00077 }
00078 
00079 /***************************************************************************//**
00080  * @brief Stops the measurement process when the functions is called.
00081  *
00082  * @return Time(in microseconds) elapsed since the measurement began.
00083 *******************************************************************************/
00084 unsigned long TIME_StopMeasure(void)
00085 {
00086     // Add your code here.
00087     return 0;
00088 }
00089 
00090 /***************************************************************************//**
00091  * @brief Creates a delay of microseconds.
00092  *
00093  * @return None.
00094 *******************************************************************************/
00095 void TIME_DelayUs(unsigned short usUnits)
00096 {
00097     // Add your code here.
00098     wait_us(usUnits);
00099 }
00100 
00101 /***************************************************************************//**
00102  * @brief Creates a delay of milliseconds.
00103  *
00104  * @return None.
00105 *******************************************************************************/
00106 void TIME_DelayMs(unsigned short msUnits)
00107 {
00108     // Add your code here.
00109     wait_ms(msUnits);
00110 }