48 PROCESS(shell_blink_process,
"blink");
51 "blink [num]: blink LEDs ([num] times)",
52 &shell_blink_process);
57 static int i, num, on = 0;
68 for(i = 0; i < num; ++i) {
69 leds_toggle(LEDS_ALL);
74 leds_toggle(LEDS_ALL);
86 if(ev == PROCESS_EVENT_TIMER && data == &
etimer) {
88 leds_toggle(LEDS_ALL);
93 if(input->len1 + input->len2 == 0) {
95 leds_toggle(LEDS_ALL);
101 input->data1, input->len1,
102 input->data2, input->len2);
105 leds_toggle(LEDS_ALL);
117 shell_blink_init(
void)
int etimer_expired(struct etimer *et)
Check if an event timer has expired.
#define PROCESS_WAIT_UNTIL(c)
Wait for a condition to occur.
#define PROCESS_EXIT()
Exit the currently running process.
#define PROCESS_BEGIN()
Define the beginning of a process.
Main header file for the Contiki shell
#define NULL
The null pointer.
void shell_output(struct shell_command *c, void *data1, int len1, const void *data2, int len2)
Output data from a shell command.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
#define PROCESS_END()
Define the end of a process.
unsigned long shell_strtolong(const char *str, const char **retstr)
Convert a string to a number.
#define PROCESS_EXITHANDLER(handler)
Specify an action when a process exits.
Structure for shell input data.
void shell_register_command(struct shell_command *c)
Register a command with the shell.
#define PROCESS_WAIT_EVENT()
Wait for an event to be posted to the process.
#define PROCESS(name, strname)
Declare a process.
void etimer_reset(struct etimer *et)
Reset an event timer with the same interval as was previously set.
int shell_event_input
The event number for shell input data.
void etimer_set(struct etimer *et, clock_time_t interval)
Set an event timer.
#define SHELL_COMMAND(name, command, description, process)
Define a shell command.
#define CLOCK_SECOND
A second, measured in system clock time.