#ifndef __FLY_PARAM_H
#define __FLY_PARAM_H
#include "includes.h"
#include "queue.h"
#include <string.h>

#define CAN_MSG_LEN 8

#define SD_MUTEX_PRIO 20

#define UART1_TASK_PRIO 23
#define UART3_TASK_PRIO 24
#define MISC_PRIO       28
#define IEC_PRIO        30
#define TCP_PRIO        31
#define IEC_STATE_PRIO  32
#define FTP_CMD_PRIO    33
#define FTP_DATA_PRIO   34
#define INIT_TASK_PRIO  35

#define INIT_STK_SIZE           128
#define MISC_TASK_STK_SIZE      512
#define IEC_TASK_STK_SIZE       1024
#define IEC_STATE_TASK_STK_SIZE 512
#define FTP_CMD_TASK_STK_SIZE   512
#define FTP_DATA_TASK_STK_SIZE  2048
#define TCP_TASK_STK_SIZE       512
#define LED1_STK_SIZE           512
#define UART1_TASK_STK_SIZE     256
#define UART3_TASK_STK_SIZE     256

extern OS_EVENT *net_mutex;
extern OS_EVENT *can1_sem;
extern OS_EVENT *can2_sem;
extern OS_EVENT *uart1_mbox;
extern OS_EVENT *uart3_mbox;
extern OS_EVENT *ftp_mbox;

extern SqQueue CanQueueCan1;
extern SqQueue CanQueueCan2;

extern CPU_STK init_task_stk[INIT_STK_SIZE];
extern CPU_STK uart1_task_stk[UART1_TASK_STK_SIZE];
extern CPU_STK uart3_task_stk[UART3_TASK_STK_SIZE];
extern CPU_STK misc_task_stk[MISC_TASK_STK_SIZE];
extern CPU_STK iec104_task_stk[IEC_TASK_STK_SIZE];
extern CPU_STK iec_state_task_stk[IEC_STATE_TASK_STK_SIZE];
extern CPU_STK ftp_server_cmd_task_stk[FTP_CMD_TASK_STK_SIZE];
extern CPU_STK ftp_server_data_task_stk[FTP_DATA_TASK_STK_SIZE];
extern CPU_STK tcp_task_stk[TCP_TASK_STK_SIZE];

#endif
