Give water to plants if dry amd pla meanwhile music the music vou can define with note length bind and breake also select several instruments for the sound

Dependencies:   mbed

Committer:
helmut
Date:
Wed Sep 19 14:16:56 2012 +0000
Revision:
0:5150b09127e3
plays mostly music that you can do with notes length breakes and bind; Some already defined; Tool is to start a pump for water to give plant is too dry.; Meanwhie plays music the most part of all

Who changed what in which revision?

UserRevisionLine numberNew contents of line
helmut 0:5150b09127e3 1 /*****************************************************************************
helmut 0:5150b09127e3 2 * lcp.h - Network Link Control Protocol header file.
helmut 0:5150b09127e3 3 *
helmut 0:5150b09127e3 4 * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
helmut 0:5150b09127e3 5 * portions Copyright (c) 1997 Global Election Systems Inc.
helmut 0:5150b09127e3 6 *
helmut 0:5150b09127e3 7 * The authors hereby grant permission to use, copy, modify, distribute,
helmut 0:5150b09127e3 8 * and license this software and its documentation for any purpose, provided
helmut 0:5150b09127e3 9 * that existing copyright notices are retained in all copies and that this
helmut 0:5150b09127e3 10 * notice and the following disclaimer are included verbatim in any
helmut 0:5150b09127e3 11 * distributions. No written agreement, license, or royalty fee is required
helmut 0:5150b09127e3 12 * for any of the authorized uses.
helmut 0:5150b09127e3 13 *
helmut 0:5150b09127e3 14 * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
helmut 0:5150b09127e3 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
helmut 0:5150b09127e3 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
helmut 0:5150b09127e3 17 * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
helmut 0:5150b09127e3 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
helmut 0:5150b09127e3 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
helmut 0:5150b09127e3 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
helmut 0:5150b09127e3 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
helmut 0:5150b09127e3 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
helmut 0:5150b09127e3 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
helmut 0:5150b09127e3 24 *
helmut 0:5150b09127e3 25 ******************************************************************************
helmut 0:5150b09127e3 26 * REVISION HISTORY
helmut 0:5150b09127e3 27 *
helmut 0:5150b09127e3 28 * 03-01-01 Marc Boucher <marc@mbsi.ca>
helmut 0:5150b09127e3 29 * Ported to lwIP.
helmut 0:5150b09127e3 30 * 97-11-05 Guy Lancaster <glanca@gesn.com>, Global Election Systems Inc.
helmut 0:5150b09127e3 31 * Original derived from BSD codes.
helmut 0:5150b09127e3 32 *****************************************************************************/
helmut 0:5150b09127e3 33 /*
helmut 0:5150b09127e3 34 * lcp.h - Link Control Protocol definitions.
helmut 0:5150b09127e3 35 *
helmut 0:5150b09127e3 36 * Copyright (c) 1989 Carnegie Mellon University.
helmut 0:5150b09127e3 37 * All rights reserved.
helmut 0:5150b09127e3 38 *
helmut 0:5150b09127e3 39 * Redistribution and use in source and binary forms are permitted
helmut 0:5150b09127e3 40 * provided that the above copyright notice and this paragraph are
helmut 0:5150b09127e3 41 * duplicated in all such forms and that any documentation,
helmut 0:5150b09127e3 42 * advertising materials, and other materials related to such
helmut 0:5150b09127e3 43 * distribution and use acknowledge that the software was developed
helmut 0:5150b09127e3 44 * by Carnegie Mellon University. The name of the
helmut 0:5150b09127e3 45 * University may not be used to endorse or promote products derived
helmut 0:5150b09127e3 46 * from this software without specific prior written permission.
helmut 0:5150b09127e3 47 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
helmut 0:5150b09127e3 48 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
helmut 0:5150b09127e3 49 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
helmut 0:5150b09127e3 50 *
helmut 0:5150b09127e3 51 * $Id: lcp.h,v 1.4 2010/01/18 20:49:43 goldsimon Exp $
helmut 0:5150b09127e3 52 */
helmut 0:5150b09127e3 53
helmut 0:5150b09127e3 54 #ifndef LCP_H
helmut 0:5150b09127e3 55 #define LCP_H
helmut 0:5150b09127e3 56 /*
helmut 0:5150b09127e3 57 * Options.
helmut 0:5150b09127e3 58 */
helmut 0:5150b09127e3 59 #define CI_MRU 1 /* Maximum Receive Unit */
helmut 0:5150b09127e3 60 #define CI_ASYNCMAP 2 /* Async Control Character Map */
helmut 0:5150b09127e3 61 #define CI_AUTHTYPE 3 /* Authentication Type */
helmut 0:5150b09127e3 62 #define CI_QUALITY 4 /* Quality Protocol */
helmut 0:5150b09127e3 63 #define CI_MAGICNUMBER 5 /* Magic Number */
helmut 0:5150b09127e3 64 #define CI_PCOMPRESSION 7 /* Protocol Field Compression */
helmut 0:5150b09127e3 65 #define CI_ACCOMPRESSION 8 /* Address/Control Field Compression */
helmut 0:5150b09127e3 66 #define CI_CALLBACK 13 /* callback */
helmut 0:5150b09127e3 67 #define CI_MRRU 17 /* max reconstructed receive unit; multilink */
helmut 0:5150b09127e3 68 #define CI_SSNHF 18 /* short sequence numbers for multilink */
helmut 0:5150b09127e3 69 #define CI_EPDISC 19 /* endpoint discriminator */
helmut 0:5150b09127e3 70
helmut 0:5150b09127e3 71 /*
helmut 0:5150b09127e3 72 * LCP-specific packet types (code numbers).
helmut 0:5150b09127e3 73 */
helmut 0:5150b09127e3 74 #define PROTREJ 8 /* Protocol Reject */
helmut 0:5150b09127e3 75 #define ECHOREQ 9 /* Echo Request */
helmut 0:5150b09127e3 76 #define ECHOREP 10 /* Echo Reply */
helmut 0:5150b09127e3 77 #define DISCREQ 11 /* Discard Request */
helmut 0:5150b09127e3 78 #define CBCP_OPT 6 /* Use callback control protocol */
helmut 0:5150b09127e3 79
helmut 0:5150b09127e3 80 /*
helmut 0:5150b09127e3 81 * The state of options is described by an lcp_options structure.
helmut 0:5150b09127e3 82 */
helmut 0:5150b09127e3 83 typedef struct lcp_options {
helmut 0:5150b09127e3 84 u_int passive : 1; /* Don't die if we don't get a response */
helmut 0:5150b09127e3 85 u_int silent : 1; /* Wait for the other end to start first */
helmut 0:5150b09127e3 86 u_int restart : 1; /* Restart vs. exit after close */
helmut 0:5150b09127e3 87 u_int neg_mru : 1; /* Negotiate the MRU? */
helmut 0:5150b09127e3 88 u_int neg_asyncmap : 1; /* Negotiate the async map? */
helmut 0:5150b09127e3 89 u_int neg_upap : 1; /* Ask for UPAP authentication? */
helmut 0:5150b09127e3 90 u_int neg_chap : 1; /* Ask for CHAP authentication? */
helmut 0:5150b09127e3 91 u_int neg_magicnumber : 1; /* Ask for magic number? */
helmut 0:5150b09127e3 92 u_int neg_pcompression : 1; /* HDLC Protocol Field Compression? */
helmut 0:5150b09127e3 93 u_int neg_accompression : 1; /* HDLC Address/Control Field Compression? */
helmut 0:5150b09127e3 94 u_int neg_lqr : 1; /* Negotiate use of Link Quality Reports */
helmut 0:5150b09127e3 95 u_int neg_cbcp : 1; /* Negotiate use of CBCP */
helmut 0:5150b09127e3 96 #ifdef PPP_MULTILINK
helmut 0:5150b09127e3 97 u_int neg_mrru : 1; /* Negotiate multilink MRRU */
helmut 0:5150b09127e3 98 u_int neg_ssnhf : 1; /* Negotiate short sequence numbers */
helmut 0:5150b09127e3 99 u_int neg_endpoint : 1; /* Negotiate endpoint discriminator */
helmut 0:5150b09127e3 100 #endif
helmut 0:5150b09127e3 101 u_short mru; /* Value of MRU */
helmut 0:5150b09127e3 102 #ifdef PPP_MULTILINK
helmut 0:5150b09127e3 103 u_short mrru; /* Value of MRRU, and multilink enable */
helmut 0:5150b09127e3 104 #endif
helmut 0:5150b09127e3 105 u_char chap_mdtype; /* which MD type (hashing algorithm) */
helmut 0:5150b09127e3 106 u32_t asyncmap; /* Value of async map */
helmut 0:5150b09127e3 107 u32_t magicnumber;
helmut 0:5150b09127e3 108 int numloops; /* Number of loops during magic number neg. */
helmut 0:5150b09127e3 109 u32_t lqr_period; /* Reporting period for LQR 1/100ths second */
helmut 0:5150b09127e3 110 #ifdef PPP_MULTILINK
helmut 0:5150b09127e3 111 struct epdisc endpoint; /* endpoint discriminator */
helmut 0:5150b09127e3 112 #endif
helmut 0:5150b09127e3 113 } lcp_options;
helmut 0:5150b09127e3 114
helmut 0:5150b09127e3 115 /*
helmut 0:5150b09127e3 116 * Values for phase from BSD pppd.h based on RFC 1661.
helmut 0:5150b09127e3 117 */
helmut 0:5150b09127e3 118 typedef enum {
helmut 0:5150b09127e3 119 PHASE_DEAD = 0,
helmut 0:5150b09127e3 120 PHASE_INITIALIZE,
helmut 0:5150b09127e3 121 PHASE_ESTABLISH,
helmut 0:5150b09127e3 122 PHASE_AUTHENTICATE,
helmut 0:5150b09127e3 123 PHASE_CALLBACK,
helmut 0:5150b09127e3 124 PHASE_NETWORK,
helmut 0:5150b09127e3 125 PHASE_TERMINATE
helmut 0:5150b09127e3 126 } LinkPhase;
helmut 0:5150b09127e3 127
helmut 0:5150b09127e3 128
helmut 0:5150b09127e3 129
helmut 0:5150b09127e3 130 extern LinkPhase lcp_phase[NUM_PPP]; /* Phase of link session (RFC 1661) */
helmut 0:5150b09127e3 131 extern lcp_options lcp_wantoptions[];
helmut 0:5150b09127e3 132 extern lcp_options lcp_gotoptions[];
helmut 0:5150b09127e3 133 extern lcp_options lcp_allowoptions[];
helmut 0:5150b09127e3 134 extern lcp_options lcp_hisoptions[];
helmut 0:5150b09127e3 135 extern ext_accm xmit_accm[];
helmut 0:5150b09127e3 136
helmut 0:5150b09127e3 137
helmut 0:5150b09127e3 138 void lcp_init (int);
helmut 0:5150b09127e3 139 void lcp_open (int);
helmut 0:5150b09127e3 140 void lcp_close (int, char *);
helmut 0:5150b09127e3 141 void lcp_lowerup (int);
helmut 0:5150b09127e3 142 void lcp_lowerdown(int);
helmut 0:5150b09127e3 143 void lcp_sprotrej (int, u_char *, int); /* send protocol reject */
helmut 0:5150b09127e3 144
helmut 0:5150b09127e3 145 extern struct protent lcp_protent;
helmut 0:5150b09127e3 146
helmut 0:5150b09127e3 147 /* Default number of times we receive our magic number from the peer
helmut 0:5150b09127e3 148 before deciding the link is looped-back. */
helmut 0:5150b09127e3 149 #define DEFLOOPBACKFAIL 10
helmut 0:5150b09127e3 150
helmut 0:5150b09127e3 151 #endif /* LCP_H */