/*
 *  This Task is a periodic task example
 *
 *
 *
 */

#include <deblin/vhal.h>
#include <time.h>
#include <pthread.h>
#include <rtl_ipc.h>
#include <semaphore.h>
#include <rtl_barrier.h>
#include <unistd.h>


static unsigned long valor1=0x0;
static unsigned long valor2=0x0;


pthread_t thread1;
pthread_t thread2;

void *task1(void *arg)
{
    
  pthread_make_periodic_np (pthread_self(), gethrtime(),1000000000);
  
  while(1)
  {
    pthread_wait_np ();
        
    hexatoascii(valor1,(char *) 0xb8000+1*5*2);
    valor1++;
  };
  
  return 0;
};

void *task2(void *arg)
{
  pthread_make_periodic_np (pthread_self(), gethrtime(),2000000000);
  
  while(1)
  {
    pthread_wait_np ();
    hexatoascii(valor2,(char *) 0xb8000+2*5*2);
    valor2++;
  };
  
  return 0;
};






