1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #2 from LudwigOrtmann/shell_syscalls

add system calls to the shell (to implement a reboot command)
This commit is contained in:
Kévin Roussel 2014-02-14 17:24:38 +01:00
commit 3753f382fc
3 changed files with 28 additions and 2 deletions

View File

@ -1,4 +1,4 @@
SRC = shell_commands.c sc_id.c
SRC = shell_commands.c sc_id.c sc_sys.c
ifneq (,$(findstring transceiver,$(USEMODULE)))
SRC += sc_transceiver.c

View File

@ -0,0 +1,24 @@
/**
* Shell commands for system calls
*
* Copyright (C) 2014 Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License. See the file LICENSE in the top level directory for more
* details.
*
* @ingroup shell_commands
* @{
* @file
* @brief shell commands for system calls
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
* @}
*/
#include "kernel.h"
void _reboot_handler(char *unused)
{
(void) unused;
reboot();
}

View File

@ -1,7 +1,7 @@
/**
* Provides prototypes for available shell commands
*
* Copyright (C) 2013 INRIA.
* Copyright (C) 2014 INRIA.
*
* This source code is licensed under the LGPLv2 license,
* See the file LICENSE for more details.
@ -24,6 +24,7 @@
#include "shell_commands.h"
extern void _id_handler(char *id);
extern void _reboot_handler(char *unused);
extern void _heap_handler(char *unused);
#ifdef MODULE_PS
@ -104,6 +105,7 @@ extern void _mersenne_get(char *str);
const shell_command_t _shell_command_list[] = {
{"id", "Gets or sets the node's id.", _id_handler},
{"reboot", "Reboot the node", _reboot_handler},
#ifdef MODULE_LPC_COMMON
{"heap", "Shows the heap state for the LPC2387 on the command shell.", _heap_handler},
#endif