cassyarduino cassyarduino / UIPEthernet
Committer:
cassyarduino
Date:
Wed Dec 21 16:58:10 2016 +0100
Revision:
0:e3fb1267e3c3
initial release

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cassyarduino 0:e3fb1267e3c3 1 /**
cassyarduino 0:e3fb1267e3c3 2 * \defgroup clock Clock interface
cassyarduino 0:e3fb1267e3c3 3 *
cassyarduino 0:e3fb1267e3c3 4 * The clock interface is the interface between the \ref timer "timer library"
cassyarduino 0:e3fb1267e3c3 5 * and the platform specific clock functionality. The clock
cassyarduino 0:e3fb1267e3c3 6 * interface must be implemented for each platform that uses the \ref
cassyarduino 0:e3fb1267e3c3 7 * timer "timer library".
cassyarduino 0:e3fb1267e3c3 8 *
cassyarduino 0:e3fb1267e3c3 9 * The clock interface does only one this: it measures time. The clock
cassyarduino 0:e3fb1267e3c3 10 * interface provides a macro, CLOCK_SECOND, which corresponds to one
cassyarduino 0:e3fb1267e3c3 11 * second of system time.
cassyarduino 0:e3fb1267e3c3 12 *
cassyarduino 0:e3fb1267e3c3 13 * \sa \ref timer "Timer library"
cassyarduino 0:e3fb1267e3c3 14 *
cassyarduino 0:e3fb1267e3c3 15 * @{
cassyarduino 0:e3fb1267e3c3 16 */
cassyarduino 0:e3fb1267e3c3 17
cassyarduino 0:e3fb1267e3c3 18 /*
cassyarduino 0:e3fb1267e3c3 19 * Copyright (c) 2004, Swedish Institute of Computer Science.
cassyarduino 0:e3fb1267e3c3 20 * All rights reserved.
cassyarduino 0:e3fb1267e3c3 21 *
cassyarduino 0:e3fb1267e3c3 22 * Redistribution and use in source and binary forms, with or without
cassyarduino 0:e3fb1267e3c3 23 * modification, are permitted provided that the following conditions
cassyarduino 0:e3fb1267e3c3 24 * are met:
cassyarduino 0:e3fb1267e3c3 25 * 1. Redistributions of source code must retain the above copyright
cassyarduino 0:e3fb1267e3c3 26 * notice, this list of conditions and the following disclaimer.
cassyarduino 0:e3fb1267e3c3 27 * 2. Redistributions in binary form must reproduce the above copyright
cassyarduino 0:e3fb1267e3c3 28 * notice, this list of conditions and the following disclaimer in the
cassyarduino 0:e3fb1267e3c3 29 * documentation and/or other materials provided with the distribution.
cassyarduino 0:e3fb1267e3c3 30 * 3. Neither the name of the Institute nor the names of its contributors
cassyarduino 0:e3fb1267e3c3 31 * may be used to endorse or promote products derived from this software
cassyarduino 0:e3fb1267e3c3 32 * without specific prior written permission.
cassyarduino 0:e3fb1267e3c3 33 *
cassyarduino 0:e3fb1267e3c3 34 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
cassyarduino 0:e3fb1267e3c3 35 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
cassyarduino 0:e3fb1267e3c3 36 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
cassyarduino 0:e3fb1267e3c3 37 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
cassyarduino 0:e3fb1267e3c3 38 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
cassyarduino 0:e3fb1267e3c3 39 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
cassyarduino 0:e3fb1267e3c3 40 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
cassyarduino 0:e3fb1267e3c3 41 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
cassyarduino 0:e3fb1267e3c3 42 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
cassyarduino 0:e3fb1267e3c3 43 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
cassyarduino 0:e3fb1267e3c3 44 * SUCH DAMAGE.
cassyarduino 0:e3fb1267e3c3 45 *
cassyarduino 0:e3fb1267e3c3 46 * This file is part of the uIP TCP/IP stack
cassyarduino 0:e3fb1267e3c3 47 *
cassyarduino 0:e3fb1267e3c3 48 * Author: Adam Dunkels <adam@sics.se>
cassyarduino 0:e3fb1267e3c3 49 *
cassyarduino 0:e3fb1267e3c3 50 * $Id: clock.h,v 1.3 2006/06/11 21:46:39 adam Exp $
cassyarduino 0:e3fb1267e3c3 51 */
cassyarduino 0:e3fb1267e3c3 52 #ifndef __UIP_CLOCK_H__
cassyarduino 0:e3fb1267e3c3 53 #define __UIP_CLOCK_H__
cassyarduino 0:e3fb1267e3c3 54
cassyarduino 0:e3fb1267e3c3 55 #include "clock-arch.h"
cassyarduino 0:e3fb1267e3c3 56
cassyarduino 0:e3fb1267e3c3 57 /**
cassyarduino 0:e3fb1267e3c3 58 * Initialize the clock library.
cassyarduino 0:e3fb1267e3c3 59 *
cassyarduino 0:e3fb1267e3c3 60 * This function initializes the clock library and should be called
cassyarduino 0:e3fb1267e3c3 61 * from the main() function of the system.
cassyarduino 0:e3fb1267e3c3 62 *
cassyarduino 0:e3fb1267e3c3 63 */
cassyarduino 0:e3fb1267e3c3 64 void uip_clock_init(void);
cassyarduino 0:e3fb1267e3c3 65
cassyarduino 0:e3fb1267e3c3 66 /**
cassyarduino 0:e3fb1267e3c3 67 * Get the current clock time.
cassyarduino 0:e3fb1267e3c3 68 *
cassyarduino 0:e3fb1267e3c3 69 * This function returns the current system clock time.
cassyarduino 0:e3fb1267e3c3 70 *
cassyarduino 0:e3fb1267e3c3 71 * \return The current clock time, measured in system ticks.
cassyarduino 0:e3fb1267e3c3 72 */
cassyarduino 0:e3fb1267e3c3 73 clock_time_t clock_time(void);
cassyarduino 0:e3fb1267e3c3 74
cassyarduino 0:e3fb1267e3c3 75 /**
cassyarduino 0:e3fb1267e3c3 76 * A second, measured in system clock time.
cassyarduino 0:e3fb1267e3c3 77 *
cassyarduino 0:e3fb1267e3c3 78 * \hideinitializer
cassyarduino 0:e3fb1267e3c3 79 */
cassyarduino 0:e3fb1267e3c3 80 #ifdef CLOCK_CONF_SECOND
cassyarduino 0:e3fb1267e3c3 81 #define CLOCK_SECOND CLOCK_CONF_SECOND
cassyarduino 0:e3fb1267e3c3 82 #else
cassyarduino 0:e3fb1267e3c3 83 #define CLOCK_SECOND (clock_time_t)32
cassyarduino 0:e3fb1267e3c3 84 #endif
cassyarduino 0:e3fb1267e3c3 85
cassyarduino 0:e3fb1267e3c3 86 #endif /* __CLOCK_H__ */
cassyarduino 0:e3fb1267e3c3 87
cassyarduino 0:e3fb1267e3c3 88 /** @} */