This short program illustrates how to use the DS130x_I2C library. My objective is to share the same RTC with Microchip 18F MCU.

Dependencies:   mbed DebugLibrary

Committer:
Yann
Date:
Fri Feb 11 10:17:20 2011 +0000
Revision:
1:995212d326ca
Parent:
0:f30e2135b0db
V0.0.0.2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Yann 0:f30e2135b0db 1 /*
Yann 0:f30e2135b0db 2 * Copyright (c) 2001, Swedish Institute of Computer Science.
Yann 0:f30e2135b0db 3 * All rights reserved.
Yann 0:f30e2135b0db 4 *
Yann 0:f30e2135b0db 5 * Redistribution and use in source and binary forms, with or without
Yann 0:f30e2135b0db 6 * modification, are permitted provided that the following conditions
Yann 0:f30e2135b0db 7 * are met:
Yann 0:f30e2135b0db 8 * 1. Redistributions of source code must retain the above copyright
Yann 0:f30e2135b0db 9 * notice, this list of conditions and the following disclaimer.
Yann 0:f30e2135b0db 10 * 2. Redistributions in binary form must reproduce the above copyright
Yann 0:f30e2135b0db 11 * notice, this list of conditions and the following disclaimer in the
Yann 0:f30e2135b0db 12 * documentation and/or other materials provided with the distribution.
Yann 0:f30e2135b0db 13 * 3. Neither the name of the Institute nor the names of its contributors
Yann 0:f30e2135b0db 14 * may be used to endorse or promote products derived from this software
Yann 0:f30e2135b0db 15 * without specific prior written permission.
Yann 0:f30e2135b0db 16 *
Yann 0:f30e2135b0db 17 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
Yann 0:f30e2135b0db 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Yann 0:f30e2135b0db 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Yann 0:f30e2135b0db 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
Yann 0:f30e2135b0db 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Yann 0:f30e2135b0db 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Yann 0:f30e2135b0db 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Yann 0:f30e2135b0db 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Yann 0:f30e2135b0db 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Yann 0:f30e2135b0db 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Yann 0:f30e2135b0db 27 * SUCH DAMAGE.
Yann 0:f30e2135b0db 28 *
Yann 0:f30e2135b0db 29 * This file is part of the lwIP TCP/IP stack.
Yann 0:f30e2135b0db 30 *
Yann 0:f30e2135b0db 31 * Author: Adam Dunkels <adam@sics.se>
Yann 0:f30e2135b0db 32 *
Yann 0:f30e2135b0db 33 */
Yann 0:f30e2135b0db 34 #ifndef __NETIF_SLIPIF_H__
Yann 0:f30e2135b0db 35 #define __NETIF_SLIPIF_H__
Yann 0:f30e2135b0db 36
Yann 0:f30e2135b0db 37 #include "lwip/netif.h"
Yann 0:f30e2135b0db 38
Yann 0:f30e2135b0db 39 #ifdef __cplusplus
Yann 0:f30e2135b0db 40 extern "C" {
Yann 0:f30e2135b0db 41 #endif
Yann 0:f30e2135b0db 42
Yann 0:f30e2135b0db 43 err_t slipif_init(struct netif * netif);
Yann 0:f30e2135b0db 44 void slipif_poll(struct netif *netif);
Yann 0:f30e2135b0db 45
Yann 0:f30e2135b0db 46 #ifdef __cplusplus
Yann 0:f30e2135b0db 47 }
Yann 0:f30e2135b0db 48 #endif
Yann 0:f30e2135b0db 49
Yann 0:f30e2135b0db 50 #endif
Yann 0:f30e2135b0db 51