Exemple #1
0
/*
 * initialization of driveTask and driveParameterBuffer
 *
 * Initialize this, if you want to let the car drive
 * start driving by calling drive(speed, direction, duration) method
 */
void navigationInit(void) {
#ifdef NAVIGATION_THREAD
	interrupts_setHandler(24, 6, irq_hall);

	driveParameterBuffer = xQueueCreate(1, sizeof(driveParameters));

	//Digitalen Input aktivieren
	PIER01_IE5 = 1;
	//Input Mode aktivieren
	DDR01_D5 = 0;
//	xHandleDrive = 0;

	//Interrupts aktivieren
	PRRR0_INT7_R = 1;
	ENIR0_EN7 = 1; //Enable interrupts
	ELVR0_LB7 = 1;
	ELVR0_LA7 = PDR01_P5;
	EIRR0_ER7 = 0; // auf 0 setzen um auslösen des nächsten Interrupts zu ermöglichen

//	DDR01_D0 = 1;

	start = PDR01_P5;

#ifdef SLAM_SCENARIO
//	start_calc_position();
	SLAM_Algorithm_initialize();
	os_registerProcessStackPriority(driveTask, "driveTask", 2990, tskIDLE_PRIORITY + 5);
#else
	os_registerProcessStackPriority(driveTask, "driveTask", 1200, tskIDLE_PRIORITY + 5);
#endif
	drive(0, 0, 700);
#ifdef DEBUG
	printf("driveTask started\n\r");
#endif
#endif
}
Exemple #2
0
Fichier : api.c Projet : el303/pses
xTaskHandle os_registerProcessStack(void(*function)(void), char * name, uint16_t stackSize) {
	return os_registerProcessStackPriority(function, name, stackSize, tskIDLE_PRIORITY + 5);
}