//////////////////////////////////////////////////////////////////
//
// App:			FreeRTOS task configuration
// Author:		Milan Korinek
// Version:		1.0
// Notice:		
//////////////////////////////////////////////////////////////////


#ifndef CONFIG_TASKS_H_
#define CONFIG_TASKS_H_

#include <asf.h>

/* Config of the task: "Guardian" */ 
#define TASK_GUARDIAN_NAME							"Guardian"
#define TASK_GUARDIAN_PRIORITY						5
#define TASK_GUARDIAN_STACK_DEPTH_WORDS				600
#define TASK_GUARDIAN_CONTROL_PIPE_LEN				4

/* Config of the task: "Controller" */
#define TASK_CONTROLLER_NAME						"Control"
#define TASK_CONTROLLER_PRIORITY					4
#define TASK_CONTROLLER_STACK_DEPTH_WORDS			600 
#define TASK_CONTROLLER_CONTROL_PIPE_LEN			4

/* Config of the task: "Port controller" */ 
#define TASK_PORTS_CONTROLLER_NAME					"PortsCntr"
#define TASK_PORTS_CONTROLLER_PRIORITY				3
#define TASK_PORTS_CONTROLLER_STACK_DEPTH_WORDS		600
#define TASK_PORTS_CONTROLLER_CONTROL_PIPE_LEN		4

#define TASK_PORTS_CONTROLLER_MAX_BLOCKS_TIME		(200UL / portTICK_RATE_MS)
#define TASK_PORTS_CONTROLLER_INTERRUPT_PRIORITY	configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY

/* Config of the task: "RUN LED" */ 
#define TASK_RUN_LED_NAME							"Run_LED"
#define TASK_RUN_LED_PRIORITY						2
#define TASK_RUN_LED_STACK_DEPTH_WORDS				600
#define TASK_RUN_LED_CONTROL_PIPE_LEN				4
#define TASK_RUN_LED_REFRESH						(100UL / portTICK_RATE_MS)

#endif /* CONFIG_TASKS_H_ */