Ejemplo n.º 1
0
int main(){
	DI();//disable interrupts or hell breaks loose during hardware config
	construct_system();//bind device addresses
	init_system();//init devices
		//clear all interrupts
	clearall_interrupts();
	EI();//enable interrupts: we have UART_recieve
	
	//set the lcd contrast
	//lcd_contrast(0x42);
	lcd_contrast(0x32);
	//clear the lcd
	clearram();
	//show boot up message
	show_bootup();
	//clear boot message
	clearram();
	//screen layout
	screen_layout();
	send(1, 225);
	send(1, 255);
	send(1, 2);
	while(1)
	{
		get_temperature1();
		get_temperature2();
		get_light();
		get_pressure();
		get_humidity();
		get_soilwetness();
		display();
		delay_ms(800);		
	}
	return 0;
}
 ExplicitSystemManager::ExplicitSystemManager(const std::string& _config_filename)
 {
     config_doc = parseJSONConfig(_config_filename);
     options.load(config_doc);
     if (config_doc.HasMember("iteration_number"))
         iteration_number = config_doc["iteration_number"].GetUint();
     else {
         iteration_number = 0;
         rapidjson::Value i;
         i.SetUint(iteration_number);
         config_doc.AddMember("iteration_number", i, config_doc.GetAllocator());
     }
     init_time_from_config();
     construct_system();
 }
Ejemplo n.º 3
0
static int __init oleole_init(void)
{
	int ret;

	printk("oleole virtual memory installed\n");

	ret = oleole_create_procfile();
	if (ret < 0)
		return 0;

	ret = construct_system();
	if (ret < 0)
		return 0;

	return 0;
}