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

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?

UserRevisionLine numberNew contents of line
cheungderek 0:e083abcfe7a8 1 /*****************************************************************************
cheungderek 0:e083abcfe7a8 2 * chpms.h - Network Microsoft Challenge Handshake Protocol header file.
cheungderek 0:e083abcfe7a8 3 *
cheungderek 0:e083abcfe7a8 4 * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
cheungderek 0:e083abcfe7a8 5 * portions Copyright (c) 1998 Global Election Systems Inc.
cheungderek 0:e083abcfe7a8 6 *
cheungderek 0:e083abcfe7a8 7 * The authors hereby grant permission to use, copy, modify, distribute,
cheungderek 0:e083abcfe7a8 8 * and license this software and its documentation for any purpose, provided
cheungderek 0:e083abcfe7a8 9 * that existing copyright notices are retained in all copies and that this
cheungderek 0:e083abcfe7a8 10 * notice and the following disclaimer are included verbatim in any
cheungderek 0:e083abcfe7a8 11 * distributions. No written agreement, license, or royalty fee is required
cheungderek 0:e083abcfe7a8 12 * for any of the authorized uses.
cheungderek 0:e083abcfe7a8 13 *
cheungderek 0:e083abcfe7a8 14 * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
cheungderek 0:e083abcfe7a8 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
cheungderek 0:e083abcfe7a8 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
cheungderek 0:e083abcfe7a8 17 * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
cheungderek 0:e083abcfe7a8 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
cheungderek 0:e083abcfe7a8 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
cheungderek 0:e083abcfe7a8 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
cheungderek 0:e083abcfe7a8 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
cheungderek 0:e083abcfe7a8 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
cheungderek 0:e083abcfe7a8 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cheungderek 0:e083abcfe7a8 24 *
cheungderek 0:e083abcfe7a8 25 ******************************************************************************
cheungderek 0:e083abcfe7a8 26 * REVISION HISTORY
cheungderek 0:e083abcfe7a8 27 *
cheungderek 0:e083abcfe7a8 28 * 03-01-01 Marc Boucher <marc@mbsi.ca>
cheungderek 0:e083abcfe7a8 29 * Ported to lwIP.
cheungderek 0:e083abcfe7a8 30 * 98-01-30 Guy Lancaster <lancasterg@acm.org>, Global Election Systems Inc.
cheungderek 0:e083abcfe7a8 31 * Original built from BSD network code.
cheungderek 0:e083abcfe7a8 32 ******************************************************************************/
cheungderek 0:e083abcfe7a8 33 /*
cheungderek 0:e083abcfe7a8 34 * chap.h - Challenge Handshake Authentication Protocol definitions.
cheungderek 0:e083abcfe7a8 35 *
cheungderek 0:e083abcfe7a8 36 * Copyright (c) 1995 Eric Rosenquist, Strata Software Limited.
cheungderek 0:e083abcfe7a8 37 * http://www.strataware.com/
cheungderek 0:e083abcfe7a8 38 *
cheungderek 0:e083abcfe7a8 39 * All rights reserved.
cheungderek 0:e083abcfe7a8 40 *
cheungderek 0:e083abcfe7a8 41 * Redistribution and use in source and binary forms are permitted
cheungderek 0:e083abcfe7a8 42 * provided that the above copyright notice and this paragraph are
cheungderek 0:e083abcfe7a8 43 * duplicated in all such forms and that any documentation,
cheungderek 0:e083abcfe7a8 44 * advertising materials, and other materials related to such
cheungderek 0:e083abcfe7a8 45 * distribution and use acknowledge that the software was developed
cheungderek 0:e083abcfe7a8 46 * by Eric Rosenquist. The name of the author may not be used to
cheungderek 0:e083abcfe7a8 47 * endorse or promote products derived from this software without
cheungderek 0:e083abcfe7a8 48 * specific prior written permission.
cheungderek 0:e083abcfe7a8 49 *
cheungderek 0:e083abcfe7a8 50 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
cheungderek 0:e083abcfe7a8 51 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
cheungderek 0:e083abcfe7a8 52 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
cheungderek 0:e083abcfe7a8 53 *
cheungderek 0:e083abcfe7a8 54 * $Id: chpms.h,v 1.5 2007/12/19 20:47:23 fbernon Exp $
cheungderek 0:e083abcfe7a8 55 */
cheungderek 0:e083abcfe7a8 56
cheungderek 0:e083abcfe7a8 57 #ifndef CHPMS_H
cheungderek 0:e083abcfe7a8 58 #define CHPMS_H
cheungderek 0:e083abcfe7a8 59
cheungderek 0:e083abcfe7a8 60 #define MAX_NT_PASSWORD 256 /* Maximum number of (Unicode) chars in an NT password */
cheungderek 0:e083abcfe7a8 61
cheungderek 0:e083abcfe7a8 62 void ChapMS (chap_state *, char *, int, char *, int);
cheungderek 0:e083abcfe7a8 63
cheungderek 0:e083abcfe7a8 64 #endif /* CHPMS_H */