// TOP Command (similar to the linux command)
void cmd_top(char *param)
{
  (void)*param;
  #if (COMPUTES_CPU_LOAD == 1)
    Transmite_CPU_Load();
  #endif
  Transmite_Uptime();
  Transmite_RAM_Ocupada();
  Transmite_Task_Stacks();
}
// TOP Command (similar to the linux command)
void usb_cmd_top(char *param)
{
  (void)*param;
  print_usb("\n\r");
#if (COMPUTES_CPU_LOAD == 1)
  Transmite_CPU_Load(USE_USB);
#endif
  Transmite_Uptime(USE_USB);
  Transmite_RAM_Ocupada(USE_USB);
  Transmite_Task_Stacks(USE_USB);
}
Example #3
0
void Task_Serial(void)
{
    /* task setup */
    INT8U pedido = 0;  
  
	strcpy_P(BufferText, (PGM_P)pgm_read_word(&(BRTOSStringTable[0])));
	Serial_Envia_Frase((CHAR8*)BufferText);
			
	Serial_Envia_Caracter(10);
	Serial_Envia_Caracter(13);
			
   // task main loop
   for (;;) 
   {

      if(!OSQueuePend(Serial, &pedido, 0))
      {
		switch(pedido)
        {
          
		  #if (COMPUTES_CPU_LOAD == 1)
          case '1':
            Transmite_CPU_Load();
			//OSCPULoad(BufferTextDebug);
			//Serial_Envia_Frase((CHAR8*)BufferTextDebug);
			Serial_Envia_Caracter(10);
			Serial_Envia_Caracter(13);			
            break;
          #endif
          case '2':
            Transmite_Uptime();
			//OSUptimeInfo(BufferTextDebug);
			//Serial_Envia_Frase((CHAR8*)BufferTextDebug);
			Serial_Envia_Caracter(10);
			Serial_Envia_Caracter(13);			
            break;
          case '3':			
            strcpy_P(BufferText, (PGM_P)pgm_read_word(&(BRTOSStringTable[0])));
            Serial_Envia_Frase((CHAR8*)BufferText);
			
            Serial_Envia_Caracter(10);
            Serial_Envia_Caracter(13);
            break;
          case '4':
            //Transmite_RAM_Ocupada();
			OSAvailableMemory(BufferTextDebug);
			Serial_Envia_Frase((CHAR8*)BufferTextDebug);
			Serial_Envia_Caracter(10);
			Serial_Envia_Caracter(13);			
            break;
		  case '5':
            Transmite_Task_Stacks();
			//OSTaskList(BufferTextDebug);
			//Serial_Envia_Frase((CHAR8*)BufferTextDebug);
			Serial_Envia_Caracter(10);
			Serial_Envia_Caracter(13);			
            break;
          #if (OSTRACE == 1) 
          case '6':
            Send_OSTrace();
            Serial_Envia_Caracter(LF);
            Serial_Envia_Caracter(CR);            
            break;            
          #endif                                    
          default:
            Serial_Envia_Caracter(pedido);
            break;
        }
      }
   }
}