1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/shell/shell_commands.c
Oliver Hahm 6be1cf2a76 [board/chronos board/msb-430h board/msba2-common drivers/cc110x_ng sys/shell
sys/transceiver]
* renamed all occurrences of cc1100 to cc110x as in fact all driver parts should
work for cc1100 and cc110x as well

[driver/cc110x_ng]
* added some documentation
* introduced a new register function to access rxfifo (fixing the of-by-one
problem on chronos platform
2010-12-11 12:09:20 +01:00

73 lines
2.4 KiB
C

#include <shell_commands.h>
#include <stdlib.h>
extern void _id_handler(char* id);
#ifdef MODULE_PS
extern void _ps_handler(char* unused);
#endif
#ifdef MODULE_RTC
extern void _date_handler(char* now);
#endif
#ifdef MODULE_SHT11
extern void _get_temperature_handler(char* unused);
extern void _get_humidity_handler(char* unused);
extern void _get_weather_handler(char* unused);
extern void _set_offset_handler(char* offset);
#endif
#ifdef MODULE_LTC4150
extern void _get_current_handler(char* unused);
extern void _reset_current_handler(char* unused);
#endif
#ifdef MODULE_CC110X
extern void _cc110x_get_address_handler(char *unused);
extern void _cc110x_set_address_handler(char *ptr);
#endif
#ifdef MODULE_TRANSCEIVER
#ifdef MODULE_CC110X_NG
extern void _cc110x_ng_get_set_address_handler(char *addr);
extern void _cc110x_ng_get_set_channel_handler(char *chan);
extern void _cc110x_ng_send_handler(char *pkt);
extern void _cc110x_ng_monitor_handler(char *mode);
#endif
#endif
const shell_command_t _shell_command_list[] = {
{"id", "Gets or sets the node's id.", _id_handler},
#ifdef MODULE_PS
{"ps", "Prints information about running threads.", _ps_handler},
#endif
#ifdef MODULE_RTC
{"date", "Gets or sets current date and time.", _date_handler},
#endif
#ifdef MODULE_SHT11
{"temp", "Prints measured temperature.", _get_temperature_handler},
{"hum", "Prints measured humidity.", _get_humidity_handler},
{"weather", "Prints measured humidity and temperature.", _get_weather_handler},
{"offset", "Set temperature offset.", _set_offset_handler},
#endif
#ifdef MODULE_LTC4150
{"cur", "Prints current and average power consumption.", _get_current_handler},
{"rstcur", "Resets coulomb counter.", _reset_current_handler},
#endif
#ifdef MODULE_CC110X
{"cc110x_get_address", "", _cc110x_get_address_handler},
{"cc110x_set_address", "", _cc110x_set_address_handler},
#endif
#ifdef MODULE_TRANSCEIVER
#ifdef MODULE_CC110X_NG
{"addr", "Gets or sets the address for the CC1100 transceiver", _cc110x_ng_get_set_address_handler},
{"chan", "Gets or sets the channel for the CC1100 transceiver", _cc110x_ng_get_set_channel_handler},
{"txtsnd", "Sends a text message to a given node via the CC1100 transceiver", _cc110x_ng_send_handler},
{"monitor", "Enables or disables address checking for the CC1100 transceiver", _cc110x_ng_monitor_handler},
#endif
#endif
{NULL, NULL, NULL}
};