These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!

Committer:
frank26080115
Date:
Sun Mar 20 05:38:56 2011 +0000
Revision:
0:bf7b9fba3924

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
frank26080115 0:bf7b9fba3924 1 /**
frank26080115 0:bf7b9fba3924 2 * \file
frank26080115 0:bf7b9fba3924 3 * Interface for the Contiki shell.
frank26080115 0:bf7b9fba3924 4 * \author Adam Dunkels <adam@dunkels.com>
frank26080115 0:bf7b9fba3924 5 *
frank26080115 0:bf7b9fba3924 6 * Some of the functions declared in this file must be implemented as
frank26080115 0:bf7b9fba3924 7 * a shell back-end in the architecture specific files of a Contiki
frank26080115 0:bf7b9fba3924 8 * port.
frank26080115 0:bf7b9fba3924 9 */
frank26080115 0:bf7b9fba3924 10
frank26080115 0:bf7b9fba3924 11
frank26080115 0:bf7b9fba3924 12 /*
frank26080115 0:bf7b9fba3924 13 * Copyright (c) 2003, Adam Dunkels.
frank26080115 0:bf7b9fba3924 14 * All rights reserved.
frank26080115 0:bf7b9fba3924 15 *
frank26080115 0:bf7b9fba3924 16 * Redistribution and use in source and binary forms, with or without
frank26080115 0:bf7b9fba3924 17 * modification, are permitted provided that the following conditions
frank26080115 0:bf7b9fba3924 18 * are met:
frank26080115 0:bf7b9fba3924 19 * 1. Redistributions of source code must retain the above copyright
frank26080115 0:bf7b9fba3924 20 * notice, this list of conditions and the following disclaimer.
frank26080115 0:bf7b9fba3924 21 * 2. Redistributions in binary form must reproduce the above copyright
frank26080115 0:bf7b9fba3924 22 * notice, this list of conditions and the following disclaimer in the
frank26080115 0:bf7b9fba3924 23 * documentation and/or other materials provided with the distribution.
frank26080115 0:bf7b9fba3924 24 * 3. The name of the author may not be used to endorse or promote
frank26080115 0:bf7b9fba3924 25 * products derived from this software without specific prior
frank26080115 0:bf7b9fba3924 26 * written permission.
frank26080115 0:bf7b9fba3924 27 *
frank26080115 0:bf7b9fba3924 28 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
frank26080115 0:bf7b9fba3924 29 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
frank26080115 0:bf7b9fba3924 30 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
frank26080115 0:bf7b9fba3924 31 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
frank26080115 0:bf7b9fba3924 32 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
frank26080115 0:bf7b9fba3924 33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
frank26080115 0:bf7b9fba3924 34 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
frank26080115 0:bf7b9fba3924 35 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
frank26080115 0:bf7b9fba3924 36 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
frank26080115 0:bf7b9fba3924 37 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
frank26080115 0:bf7b9fba3924 38 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
frank26080115 0:bf7b9fba3924 39 *
frank26080115 0:bf7b9fba3924 40 * This file is part of the Contiki desktop OS.
frank26080115 0:bf7b9fba3924 41 *
frank26080115 0:bf7b9fba3924 42 * $Id: shell.h,v 1.1 2006/06/07 09:43:54 adam Exp $
frank26080115 0:bf7b9fba3924 43 *
frank26080115 0:bf7b9fba3924 44 */
frank26080115 0:bf7b9fba3924 45 #ifndef __SHELL_H__
frank26080115 0:bf7b9fba3924 46 #define __SHELL_H__
frank26080115 0:bf7b9fba3924 47
frank26080115 0:bf7b9fba3924 48 /**
frank26080115 0:bf7b9fba3924 49 * Initialize the shell.
frank26080115 0:bf7b9fba3924 50 *
frank26080115 0:bf7b9fba3924 51 * Called when the shell front-end process starts. This function may
frank26080115 0:bf7b9fba3924 52 * be used to start listening for signals.
frank26080115 0:bf7b9fba3924 53 */
frank26080115 0:bf7b9fba3924 54 void shell_init(void);
frank26080115 0:bf7b9fba3924 55
frank26080115 0:bf7b9fba3924 56 /**
frank26080115 0:bf7b9fba3924 57 * Start the shell back-end.
frank26080115 0:bf7b9fba3924 58 *
frank26080115 0:bf7b9fba3924 59 * Called by the front-end when a new shell is started.
frank26080115 0:bf7b9fba3924 60 */
frank26080115 0:bf7b9fba3924 61 void shell_start(void);
frank26080115 0:bf7b9fba3924 62
frank26080115 0:bf7b9fba3924 63 /**
frank26080115 0:bf7b9fba3924 64 * Process a shell command.
frank26080115 0:bf7b9fba3924 65 *
frank26080115 0:bf7b9fba3924 66 * This function will be called by the shell GUI / telnet server whan
frank26080115 0:bf7b9fba3924 67 * a command has been entered that should be processed by the shell
frank26080115 0:bf7b9fba3924 68 * back-end.
frank26080115 0:bf7b9fba3924 69 *
frank26080115 0:bf7b9fba3924 70 * \param command The command to be processed.
frank26080115 0:bf7b9fba3924 71 */
frank26080115 0:bf7b9fba3924 72 void shell_input(char *command);
frank26080115 0:bf7b9fba3924 73
frank26080115 0:bf7b9fba3924 74 /**
frank26080115 0:bf7b9fba3924 75 * Quit the shell.
frank26080115 0:bf7b9fba3924 76 *
frank26080115 0:bf7b9fba3924 77 */
frank26080115 0:bf7b9fba3924 78 void shell_quit(char *);
frank26080115 0:bf7b9fba3924 79
frank26080115 0:bf7b9fba3924 80
frank26080115 0:bf7b9fba3924 81 /**
frank26080115 0:bf7b9fba3924 82 * Print a string to the shell window.
frank26080115 0:bf7b9fba3924 83 *
frank26080115 0:bf7b9fba3924 84 * This function is implemented by the shell GUI / telnet server and
frank26080115 0:bf7b9fba3924 85 * can be called by the shell back-end to output a string in the
frank26080115 0:bf7b9fba3924 86 * shell window. The string is automatically appended with a linebreak.
frank26080115 0:bf7b9fba3924 87 *
frank26080115 0:bf7b9fba3924 88 * \param str1 The first half of the string to be output.
frank26080115 0:bf7b9fba3924 89 * \param str2 The second half of the string to be output.
frank26080115 0:bf7b9fba3924 90 */
frank26080115 0:bf7b9fba3924 91 void shell_output(char *str1, char *str2);
frank26080115 0:bf7b9fba3924 92
frank26080115 0:bf7b9fba3924 93 /**
frank26080115 0:bf7b9fba3924 94 * Print a prompt to the shell window.
frank26080115 0:bf7b9fba3924 95 *
frank26080115 0:bf7b9fba3924 96 * This function can be used by the shell back-end to print out a
frank26080115 0:bf7b9fba3924 97 * prompt to the shell window.
frank26080115 0:bf7b9fba3924 98 *
frank26080115 0:bf7b9fba3924 99 * \param prompt The prompt to be printed.
frank26080115 0:bf7b9fba3924 100 *
frank26080115 0:bf7b9fba3924 101 */
frank26080115 0:bf7b9fba3924 102 void shell_prompt(char *prompt);
frank26080115 0:bf7b9fba3924 103
frank26080115 0:bf7b9fba3924 104 #endif /* __SHELL_H__ */