diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-02-21 07:24:53 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-02-21 07:24:53 +0000 |
commit | 157b6f9695e7f72f2d54b231c19cb4045710ed01 (patch) | |
tree | a856d81bf5f173c207510fdeb7367e218f12b3db /os/various | |
parent | a90a90ffcf0f90b2a4b6c24dc5a60e72652549f1 (diff) | |
download | ChibiOS-157b6f9695e7f72f2d54b231c19cb4045710ed01.tar.gz ChibiOS-157b6f9695e7f72f2d54b231c19cb4045710ed01.tar.bz2 ChibiOS-157b6f9695e7f72f2d54b231c19cb4045710ed01.zip |
Updated license dates.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1646 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/various')
-rw-r--r-- | os/various/ch.cpp | 2 | ||||
-rw-r--r-- | os/various/ch.hpp | 14 | ||||
-rw-r--r-- | os/various/evtimer.c | 2 | ||||
-rw-r--r-- | os/various/evtimer.h | 2 | ||||
-rw-r--r-- | os/various/memstreams.c | 2 | ||||
-rw-r--r-- | os/various/memstreams.h | 2 | ||||
-rw-r--r-- | os/various/shell.c | 28 | ||||
-rw-r--r-- | os/various/shell.h | 8 | ||||
-rw-r--r-- | os/various/syscalls.c | 340 | ||||
-rw-r--r-- | os/various/various.dox | 2 |
10 files changed, 201 insertions, 201 deletions
diff --git a/os/various/ch.cpp b/os/various/ch.cpp index 36999620a..51665a20a 100644 --- a/os/various/ch.cpp +++ b/os/various/ch.cpp @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
diff --git a/os/various/ch.hpp b/os/various/ch.hpp index f0055a174..aaf27a6d2 100644 --- a/os/various/ch.hpp +++ b/os/various/ch.hpp @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
@@ -74,7 +74,7 @@ namespace chibios_rt { class Timer {
public:
/**
- * @brief Embedded @p VirtualTimer structure. + * @brief Embedded @p VirtualTimer structure.
*/
struct ::VirtualTimer timer;
@@ -113,7 +113,7 @@ namespace chibios_rt { class BaseThread {
public:
/**
- * @brief Pointer to the system thread. + * @brief Pointer to the system thread.
*/
::Thread *thread_ref;
@@ -250,7 +250,7 @@ namespace chibios_rt { public:
/**
- * @brief The thread name. + * @brief The thread name.
*/
const char *name;
@@ -415,19 +415,19 @@ namespace chibios_rt { /**
* @brief Signals the CondVar.
- * @details The next thread waiting on the @p CondVar, if any, is awakened. + * @details The next thread waiting on the @p CondVar, if any, is awakened.
*/
void Signal(void);
/**
- * @brief Broadcasts the CondVar. + * @brief Broadcasts the CondVar.
* @details All the threads waiting on the @p CondVar, if any, are awakened.
*/
void Broadcast(void);
/**
* @brief Waits on the CondVar while releasing the controlling mutex.
- * + *
* @return The wakep mode.
* @retval RDY_OK if the condvar was signaled using chCondSignal().
* @retval RDY_RESET if the condvar was signaled using chCondBroadcast().
diff --git a/os/various/evtimer.c b/os/various/evtimer.c index 1a82792de..140d90ed0 100644 --- a/os/various/evtimer.c +++ b/os/various/evtimer.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
diff --git a/os/various/evtimer.h b/os/various/evtimer.h index acfc97eb1..3f675fffc 100644 --- a/os/various/evtimer.h +++ b/os/various/evtimer.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
diff --git a/os/various/memstreams.c b/os/various/memstreams.c index 935847ece..9e6bd1e3a 100644 --- a/os/various/memstreams.c +++ b/os/various/memstreams.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
diff --git a/os/various/memstreams.h b/os/various/memstreams.h index e7c54618b..ce1a8d69c 100644 --- a/os/various/memstreams.h +++ b/os/various/memstreams.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
diff --git a/os/various/shell.c b/os/various/shell.c index b8423e147..41c78b1d8 100644 --- a/os/various/shell.c +++ b/os/various/shell.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
@@ -35,7 +35,7 @@ #endif
/**
- * @brief Shell termination event source. + * @brief Shell termination event source.
*/
EventSource shell_terminated;
@@ -107,7 +107,7 @@ static void cmd_systime(BaseChannel *chp, int argc, char *argv[]) { }
/**
- * @brief Array of the default commands. + * @brief Array of the default commands.
*/
static ShellCommand local_commands[] = {
{"info", cmd_info},
@@ -130,11 +130,11 @@ static bool_t cmdexec(const ShellCommand *scp, BaseChannel *chp, /**
* @brief Shell thread function.
- * - * @param[in] p pointer to a @p BaseChannel object + *
+ * @param[in] p pointer to a @p BaseChannel object
* @return Termination reason.
* @retval RDY_OK terminated by command.
- * @retval RDY_RESET terminated by reset condition on the I/O channel. + * @retval RDY_RESET terminated by reset condition on the I/O channel.
*/
static msg_t shell_thread(void *p) {
int n;
@@ -192,7 +192,7 @@ static msg_t shell_thread(void *p) { }
/**
- * @brief Shell manager initialization. + * @brief Shell manager initialization.
*/
void shellInit(void) {
@@ -201,8 +201,8 @@ void shellInit(void) { /**
* @brief Spawns a new shell.
- * - * @param[in] scp pointer to a @p ShellConfig object + *
+ * @param[in] scp pointer to a @p ShellConfig object
* @param[in] size size of the shell working area to be allocated
* @param[in] prio the priority level for the new shell
*
@@ -216,9 +216,9 @@ Thread *shellCreate(const ShellConfig *scp, size_t size, tprio_t prio) { /**
* @brief Prints a string.
- * + *
* @param[in] chp pointer to a @p BaseChannel object
- * @param[in] msg pointer to the string + * @param[in] msg pointer to the string
*/
void shellPrint(BaseChannel *chp, const char *msg) {
@@ -240,11 +240,11 @@ void shellPrintLine(BaseChannel *chp, const char *msg) { /**
* @brief Reads a whole line from the input channel.
- * + *
* @param[in] chp pointer to a @p BaseChannel object
- * @param[in] line pointer to the line buffer + * @param[in] line pointer to the line buffer
* @param[in] size buffer maximum length
- * + *
* @return The operation status.
* @retval TRUE the channel was reset or CTRL-D pressed.
* @retval FALSE operation successful.
diff --git a/os/various/shell.h b/os/various/shell.h index c3433bc21..821a2c985 100644 --- a/os/various/shell.h +++ b/os/various/shell.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
@@ -49,12 +49,12 @@ #endif
/**
- * @brief Command handler function type. + * @brief Command handler function type.
*/
typedef void (*shellcmd_t)(BaseChannel *chp, int argc, char *argv[]);
/**
- * @brief Custom command entry type. + * @brief Custom command entry type.
*/
typedef struct {
const char *sc_name; /**< @brief Command name. */
@@ -62,7 +62,7 @@ typedef struct { } ShellCommand;
/**
- * @brief Shell descriptor type. + * @brief Shell descriptor type.
*/
typedef struct {
BaseChannel *sc_channel; /**< @brief I/O channel associated
diff --git a/os/various/syscalls.c b/os/various/syscalls.c index 5c886f8f5..0f0a14619 100644 --- a/os/various/syscalls.c +++ b/os/various/syscalls.c @@ -1,170 +1,170 @@ -/* - ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio. - - This file is part of ChibiOS/RT. - - ChibiOS/RT is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - ChibiOS/RT is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ -/* -* **** This file incorporates work covered by the following copyright and **** -* **** permission notice: **** -* -* Copyright (c) 2009 by Michael Fischer. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* 1. Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* 2. Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* 3. Neither the name of the author nor the names of its contributors may -* be used to endorse or promote products derived from this software -* without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -* SUCH DAMAGE. -* -**************************************************************************** -* History: -* -* 28.03.09 mifi First Version, based on the original syscall.c from -* newlib version 1.17.0 -* 17.08.09 gdisirio Modified the file for use under ChibiOS/RT -* 15.11.09 gdisirio Added read and write handling -****************************************************************************/ - -#include <stdlib.h> -#include <errno.h> -#include <string.h> -#include <sys/stat.h> -#include <sys/types.h> - -#include "ch.h" -#if defined(STDOUT_SD) || defined(STDIN_SD) -#include "hal.h" -#endif - -/***************************************************************************/ - -int _read_r(struct _reent *r, int file, char * ptr, int len) -{ - (void)r; -#if defined(STDIN_SD) - if (!len || (file != 0)) { - __errno_r(r) = EINVAL; - return -1; - } - len = sdRead(&STDOUT_SD, (uint8_t *)ptr, (size_t)len); - return len; -#else - (void)file; - (void)ptr; - (void)len; - __errno_r(r) = EINVAL; - return -1; -#endif -} - -/***************************************************************************/ - -int _lseek_r(struct _reent *r, int file, int ptr, int dir) -{ - (void)r; - (void)file; - (void)ptr; - (void)dir; - - return 0; -} - -/***************************************************************************/ - -int _write_r(struct _reent *r, int file, char * ptr, int len) -{ - (void)r; - (void)file; - (void)ptr; -#if defined(STDOUT_SD) - if (file != 1) { - __errno_r(r) = EINVAL; - return -1; - } - sdWrite(&STDOUT_SD, (uint8_t *)ptr, (size_t)len); -#endif - return len; -} - -/***************************************************************************/ - -int _close_r(struct _reent *r, int file) -{ - (void)r; - (void)file; - - return 0; -} - -/***************************************************************************/ - -caddr_t _sbrk_r(struct _reent *r, int incr) -{ - void *p; - - chDbgCheck(incr > 0, "_sbrk_r"); - - (void)r; - p = chCoreAlloc((size_t)incr); - if (p == NULL) { - __errno_r(r) = ENOMEM; - return (caddr_t)-1; - } - return (caddr_t)p; -} - -/***************************************************************************/ - -int _fstat_r(struct _reent *r, int file, struct stat * st) -{ - (void)r; - (void)file; - - memset(st, 0, sizeof(*st)); - st->st_mode = S_IFCHR; - return 0; -} - -/***************************************************************************/ - -int _isatty_r(struct _reent *r, int fd) -{ - (void)r; - (void)fd; - - return 1; -} - -/*** EOF ***/ +/*
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
+
+ This file is part of ChibiOS/RT.
+
+ ChibiOS/RT is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/RT is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/*
+* **** This file incorporates work covered by the following copyright and ****
+* **** permission notice: ****
+*
+* Copyright (c) 2009 by Michael Fischer. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* 1. Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+* 3. Neither the name of the author nor the names of its contributors may
+* be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+* SUCH DAMAGE.
+*
+****************************************************************************
+* History:
+*
+* 28.03.09 mifi First Version, based on the original syscall.c from
+* newlib version 1.17.0
+* 17.08.09 gdisirio Modified the file for use under ChibiOS/RT
+* 15.11.09 gdisirio Added read and write handling
+****************************************************************************/
+
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include "ch.h"
+#if defined(STDOUT_SD) || defined(STDIN_SD)
+#include "hal.h"
+#endif
+
+/***************************************************************************/
+
+int _read_r(struct _reent *r, int file, char * ptr, int len)
+{
+ (void)r;
+#if defined(STDIN_SD)
+ if (!len || (file != 0)) {
+ __errno_r(r) = EINVAL;
+ return -1;
+ }
+ len = sdRead(&STDOUT_SD, (uint8_t *)ptr, (size_t)len);
+ return len;
+#else
+ (void)file;
+ (void)ptr;
+ (void)len;
+ __errno_r(r) = EINVAL;
+ return -1;
+#endif
+}
+
+/***************************************************************************/
+
+int _lseek_r(struct _reent *r, int file, int ptr, int dir)
+{
+ (void)r;
+ (void)file;
+ (void)ptr;
+ (void)dir;
+
+ return 0;
+}
+
+/***************************************************************************/
+
+int _write_r(struct _reent *r, int file, char * ptr, int len)
+{
+ (void)r;
+ (void)file;
+ (void)ptr;
+#if defined(STDOUT_SD)
+ if (file != 1) {
+ __errno_r(r) = EINVAL;
+ return -1;
+ }
+ sdWrite(&STDOUT_SD, (uint8_t *)ptr, (size_t)len);
+#endif
+ return len;
+}
+
+/***************************************************************************/
+
+int _close_r(struct _reent *r, int file)
+{
+ (void)r;
+ (void)file;
+
+ return 0;
+}
+
+/***************************************************************************/
+
+caddr_t _sbrk_r(struct _reent *r, int incr)
+{
+ void *p;
+
+ chDbgCheck(incr > 0, "_sbrk_r");
+
+ (void)r;
+ p = chCoreAlloc((size_t)incr);
+ if (p == NULL) {
+ __errno_r(r) = ENOMEM;
+ return (caddr_t)-1;
+ }
+ return (caddr_t)p;
+}
+
+/***************************************************************************/
+
+int _fstat_r(struct _reent *r, int file, struct stat * st)
+{
+ (void)r;
+ (void)file;
+
+ memset(st, 0, sizeof(*st));
+ st->st_mode = S_IFCHR;
+ return 0;
+}
+
+/***************************************************************************/
+
+int _isatty_r(struct _reent *r, int fd)
+{
+ (void)r;
+ (void)fd;
+
+ return 1;
+}
+
+/*** EOF ***/
diff --git a/os/various/various.dox b/os/various/various.dox index 10dfe874f..19d7987d9 100644 --- a/os/various/various.dox +++ b/os/various/various.dox @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
|