Пример #1
0
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(sky_shell_process, ev, data)
{
    PROCESS_BEGIN();

    serial_shell_init();
    shell_blink_init();
    shell_file_init();
    shell_coffee_init();
    shell_ps_init();
    shell_reboot_init();
    shell_rime_init();
    /*  shell_rime_debug_init();*/
    shell_rime_netcmd_init();
    /*   shell_rime_ping_init(); */
    shell_rime_neighbors_init();
    shell_rime_sendcmd_init();
    /*  shell_rime_sniff_init();*/
    shell_rime_unicast_init();
    /*shell_sky_init();*/
    shell_text_init();
    shell_time_init();

    SENSORS_ACTIVATE(acc_sensor);
    shell_register_command(&acc_command);
    shell_register_command(&poke_command);
    shell_register_command(&peek_command);
    shell_register_command(&leds_command);

    PROCESS_END();
}
Пример #2
0
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(sky_shell_process, ev, data)
{
  PROCESS_BEGIN();

  /* XXX the Sentilla JCreate has 8 LEDs, and we need to set the ports
     correctly. */
  LEDS_PxDIR = 0xff;
  LEDS_PxOUT = 0xff;
  
  serial_shell_init();
  shell_blink_init();
  shell_file_init();
  shell_coffee_init();
  shell_ps_init();
  shell_reboot_init();
  shell_rime_init();
  /*  shell_rime_debug_init();*/
  shell_rime_netcmd_init();
  shell_rime_ping_init();
  shell_rime_neighbors_init();
  shell_rime_sendcmd_init();
  /*  shell_rime_sniff_init();*/
  shell_rime_unicast_init();
  /*shell_sky_init();*/
  shell_text_init();
  shell_time_init();

  acc_sensor.activate();
  shell_register_command(&acc_command);
  shell_register_command(&poke_command);
  shell_register_command(&peek_command);
  shell_register_command(&leds_command);
  
  PROCESS_END();
}
Пример #3
0
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(sky_telnetd_process, ev, data)
{
  PROCESS_BEGIN();

  PROCESS_PAUSE();

  shell_blink_init();
  /*  shell_file_init();
      shell_netfile_init();*/
  shell_ps_init();
  shell_reboot_init();
  /*shell_rime_init();*/
  /*shell_rime_ping_init();*/
  /*shell_rime_netcmd_init();*/
  /*shell_rime_sniff_init();*/
  shell_sky_init();
  shell_text_init();
  shell_time_init();

  shell_register_command(&id_command);

  while(1) {
    PROCESS_WAIT_EVENT();
  }

  PROCESS_END();

}
Пример #4
0
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(shell_init_process, ev, data)
{
  PROCESS_BEGIN();

#ifdef __CC65__
  shell_ps_init();
  shell_netstat_init();
  shell_wget_init();
  shell_memdebug_init();
#else /* __CC65__ */
  shell_file_init();
  shell_httpd_init();
  shell_irc_init();
  shell_ps_init();
  shell_run_init();
  shell_text_init();
  shell_time_init();
  shell_wget_init();
#endif /* __CC65__ */

  PROCESS_END();
}
Пример #5
0
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(mb851_shell_process, ev, data)
{
  PROCESS_BEGIN();

  serial_shell_init();
  shell_blink_init();
  shell_ps_init();
  shell_reboot_init();
  shell_text_init();
  shell_time_init();
  shell_sensors_init();
  
  PROCESS_END();
}
Пример #6
0
/*-----------------------------------------------------------------------------------*/
void
telnetd_gui_init(void)
{
  shell_file_init();
  shell_ps_init();
  shell_run_init();
  shell_text_init();
  shell_time_init();
  shell_wget_init();

  ctk_window_new(&window, XSIZE, YSIZE, "Shell server");
  CTK_WIDGET_ADD(&window, &loglabel);
  memset(log, 0, sizeof(log));
  ctk_window_open(&window);
}
Пример #7
0
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(test_shell_process, ev, data)
{
  PROCESS_BEGIN();

  serial_shell_init();

  shell_coffee_init();
  shell_exec_init();
  shell_file_init();
  shell_ps_init();
  shell_rime_init();
  shell_rime_netcmd_init();
  shell_text_init();

  PROCESS_END();
}
Пример #8
0
/*-----------------------------------------------------------------------------------*/
PROCESS_THREAD(shell_gui_process, ev, data)
{
  PROCESS_BEGIN();

  ctk_window_new(&window, SHELL_GUI_XSIZE,
		 SHELL_GUI_YSIZE + 1, "Command shell");
  CTK_WIDGET_ADD(&window, &loglabel);
  /*    CTK_WIDGET_SET_FLAG(&loglabel, CTK_WIDGET_FLAG_MONOSPACE);*/
  CTK_WIDGET_ADD(&window, &commandentry);
  /*    CTK_WIDGET_SET_FLAG(&commandentry, CTK_WIDGET_FLAG_MONOSPACE);*/
  CTK_WIDGET_FOCUS(&window, &commandentry);

  shell_init();
  shell_file_init();
  shell_ps_init();
  shell_run_init();
  shell_text_init();
  shell_time_init();
  shell_wget_init();

  ctk_window_open(&window);

  while(1) {
    PROCESS_WAIT_EVENT();

    if(ev == ctk_signal_widget_activate &&
       data == (process_data_t)&commandentry) {
      int command_len = (int)strlen(command);
      shell_default_output("> ", 2, command, command_len);
      shell_input(command, command_len);
      if(shell_gui_process.state) {
        CTK_TEXTENTRY_CLEAR(&commandentry);
        CTK_WIDGET_REDRAW(&commandentry);
      }
    } else if(ev == ctk_signal_window_close ||
	      ev == PROCESS_EVENT_EXIT) {
      shell_quit();
      ctk_window_close(&window);
      process_exit(&shell_gui_process);
      LOADER_UNLOAD();
    }
  }
  PROCESS_END();
}
Пример #9
0
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(shell_init_process, ev, data)
{
    PROCESS_BEGIN();
    shell_ps_init();
    shell_netstat_init();
    shell_memdebug_init();
    shell_text_init();
    shell_time_init();
    shell_blink_init();
    shell_rime_neighbors_init();
    shell_rime_netcmd_init();
    shell_rime_ping_init();
    shell_rime_sendcmd_init();
    shell_sendtest_init();
    shell_collect_view_init();
    shell_rime_init();
    shell_tcpsend_init();
    PROCESS_END();
}
Пример #10
0
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(sky_telnetd_process, ev, data)
{
  PROCESS_BEGIN();

  PROCESS_PAUSE();

  shell_blink_init();
  shell_ps_init();
  shell_rime_init();
  shell_rime_ping_init();
  shell_rime_netcmd_init();

  shell_register_command(&id_command);
  
  while(1) {
    PROCESS_WAIT_EVENT();
  }
  
  PROCESS_END();
    
}
Пример #11
0
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(example_shell_process, ev, data)
{
  PROCESS_BEGIN();

  serial_shell_init();

  shell_blink_init();
  /*shell_checkpoint_init();*/
  /*shell_coffee_init();*/
  shell_download_init();
  /*shell_exec_init();*/
  shell_file_init();
  shell_httpd_init();
  shell_irc_init();
  shell_netfile_init();
  /*shell_ping_init();*/ /* uIP ping */
  shell_power_init();
  /*shell_profile_init();*/
  shell_ps_init();
  /*shell_reboot_init();*/
  shell_rime_debug_init();
  shell_rime_netcmd_init();
  shell_rime_ping_init(); /* Rime ping */
  shell_rime_sendcmd_init();
  shell_rime_sniff_init();
  shell_rime_init();
  /*shell_rsh_init();*/
  shell_run_init();
  shell_sendtest_init();
  /*shell_sky_init();*/
  shell_tcpsend_init();
  shell_text_init();
  shell_time_init();
  shell_udpsend_init();
  shell_vars_init();
  shell_wget_init();
  shell_tweet_init();

  PROCESS_END();
}
Пример #12
0
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(sky_shell_process, ev, data)
{
  PROCESS_BEGIN();

  serial_shell_init();
  shell_blink_init();
  shell_file_init();
  shell_coffee_init();
  shell_ps_init();
  shell_reboot_init();
  shell_rime_init();
  /*shell_rime_netcmd_init();*/
  /*shell_rime_ping_init();*/
  /*shell_rime_debug_init();*/
  /*shell_rime_sniff_init();*/
  shell_rime_sendcmd_init();
  shell_download_init();
  shell_sky_init();
  shell_text_init();
  shell_time_init();
  shell_checkpoint_init();

  PROCESS_END();
}
Пример #13
0
PROCESS_THREAD(accel_process, ev, data) {
  PROCESS_BEGIN();
  {
    int16_t x, y, z;

    serial_shell_init();
    shell_ps_init();
    shell_file_init();  // for printing out files
    shell_text_init();  // for binprint

    /* Register the event used for lighting up an LED when interrupt strikes. */
    ledOff_event = process_alloc_event();

    /* Start and setup the accelerometer with default values, eg no interrupts enabled. */
    accm_init();

    /* Register the callback functions for each interrupt */
    ACCM_REGISTER_INT1_CB(accm_ff_cb);
    ACCM_REGISTER_INT2_CB(accm_tap_cb);

    /* Set what strikes the corresponding interrupts. Several interrupts per pin is 
      possible. For the eight possible interrupts, see adxl345.h and adxl345 datasheet. */
    accm_set_irq(ADXL345_INT_FREEFALL, ADXL345_INT_TAP + ADXL345_INT_DOUBLETAP);

    while (1) {
	    x = accm_read_axis(X_AXIS);
	    y = accm_read_axis(Y_AXIS);
	    z = accm_read_axis(Z_AXIS);
	    printf("x: %d y: %d z: %d\n", x, y, z);

      etimer_set(&et, ACCM_READ_INTERVAL);
      PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
    }
  }
  PROCESS_END();
}