OpenCores
URL https://opencores.org/ocsvn/plasma/plasma/trunk

Subversion Repositories plasma

[/] [plasma/] [trunk/] [kernel/] [rtos_test.c] - Diff between revs 275 and 283

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 275 Rev 283
Line 430... Line 430...
void ConsoleInit(void);
void ConsoleInit(void);
void exit(int);
void exit(int);
 
 
void MainThread(void *Arg)
void MainThread(void *Arg)
{
{
   int ch, i;
   int ch, i, display=1;
   (void)Arg;
   (void)Arg;
#ifdef __MMU_ENUM_H__
#ifdef __MMU_ENUM_H__
   OS_MMUInit();
   OS_MMUInit();
#endif
#endif
 
 
Line 447... Line 447...
   ConsoleInit();
   ConsoleInit();
#endif
#endif
 
 
   for(;;)
   for(;;)
   {
   {
 
      if(display)
 
      {
      printf("\n");
      printf("\n");
      printf("1 CLib\n");
      printf("1 CLib\n");
      printf("2 Heap\n");
      printf("2 Heap\n");
      printf("3 Thread\n");
      printf("3 Thread\n");
      printf("4 Semaphore\n");
      printf("4 Semaphore\n");
Line 460... Line 462...
      printf("8 Math\n");
      printf("8 Math\n");
      printf("9 Syscall\n");
      printf("9 Syscall\n");
#ifdef __MMU_ENUM_H__
#ifdef __MMU_ENUM_H__
      printf("p MMU Process\n");
      printf("p MMU Process\n");
#endif
#endif
 
      }
      printf("> ");
      printf("> ");
 
      display = 1;
      ch = UartRead();
      ch = UartRead();
      printf("%c\n", ch);
      printf("%c\n", ch);
      switch(ch)
      switch(ch)
      {
      {
#ifdef WIN32
#ifdef WIN32
Line 487... Line 491...
#ifdef WIN32
#ifdef WIN32
      case 'm': TestMathFull(); break;
      case 'm': TestMathFull(); break;
#endif
#endif
      case 'g': printf("Global=%d\n", ++Global); break;
      case 'g': printf("Global=%d\n", ++Global); break;
      default:
      default:
         printf("Error");
         printf("E");
 
         display = 0;
         for(i = 0; i < 30; ++i)
         for(i = 0; i < 30; ++i)
         {
         {
            while(kbhit())
            while(kbhit())
               ch = UartRead();
               ch = UartRead();
            OS_ThreadSleep(1);
            OS_ThreadSleep(1);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.