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