Exemple #1
0
int main(void)
{
  INTR_DISABLE; /* 割込み無効にする */

  init_system();
  init_components();
  test_execute();

  if (PORTCONF_SDC_DETECT() && !sw_read(Sw1)) {
      puts("Boot : SDC detected.\n");
      puts("Boot : Booting from SDC.\n");
      boot_from_sdc("kozos");
      puts("Boot : Boot from SDC failed.\n");
      puts("Boot : Going to serial boot mode.\n");
      boot_from_ser();
  } else {
      puts("Boot : SDC not found.\n");
      puts("Boot : Going to serial boot mode.\n");
      boot_from_ser();
  }

  for (;;) { }

  return 0;
}
Exemple #2
0
    SimpleFilter<Scalar>::SimpleFilter(const Hermes::vector<Solution<Scalar>*>& solutions, const Hermes::vector<int>& items)
    {
      this->num = solutions.size();
      if(this->num > 10)
        error("Attempt to create an instance of Filter with more than 10 MeshFunctions.");
      if(items.size() != (unsigned) this->num)
        if(items.size() > 0)
          error("Attempt to create an instance of SimpleFilter with different supplied number of MeshFunctions than the number of types of data used from them.");

      for(int i = 0; i < this->num; i++)
      {
        this->sln[i] = solutions.at(i);
        if(items.size() > 0)
          this->item[i] = items.at(i);
        else
          this->item[i] = H2D_FN_VAL;
      }
      this->init();
      init_components();
    }
Exemple #3
0
SimpleFilter::SimpleFilter(void (*filter_fn)(int n, Tuple<scalar*> values, scalar* result),
		Tuple<MeshFunction*> solutions, Tuple<int> items) : filter_fn(filter_fn)
{
	this->num = solutions.size();
	if(num > 10)
		error("Attempt to create an instance of Filter with more than 10 MeshFunctions."); 
	if(items.size() != num)
		if(items.size() > 0)
			error("Attempt to create an instance of SimpleFilter with different supplied number of MeshFunctions than the number of types of data used from them.");

	for(int i = 0; i < this->num; i++)
	{
		this->sln[i] = solutions.at(i);
		if(items.size() > 0)
			this->item[i] = items.at(i);
		else
			this->item[i] =	H2D_FN_VAL;
	}
	this->init();
	init_components();
}
Exemple #4
0
CAgentManager::CAgentManager			()
{
	init_scheduler				();
	init_components				();
}