

 //Free RTOS
 #include "FreeRTOS.h"
 #include "task.h"
/* Demo includes. */
#include "partest.h"

/* TI includes. */
#include "driverlib.h"

#include "serial.h"
/* Standard includes. */
#include "string.h"
#include "stdio.h"

#define cmdQUEUE_LENGTH         25
#ifndef configCLI_BAUD_RATE
    #define configCLI_BAUD_RATE 115200
#endif

static const char * const pcWelcomeMessage = "msg 1\n\r";


 #define EnergyConsumption_A 30
 #define EnergyConsumption_B 50

 #define Priority_A 3
 #define Priority_B 2

 static void TaskA(void * pvParam);
 static void TaskB(void * pvParam);

#define mainTASK_LED                        ( 0 )


 void vTask_EnergyTask(void)
 {
     xTaskCreateEnergy(TaskA,//태스크를 실행할 함수 포인터
     "TaskA",//태스크 이름
     1024,//스택 크기  word
     ( void * ) NULL,//태스크의 매개변수
     Priority_A,//우선순위
     NULL,
     EnergyConsumption_A,
     "A",
     1000,
     50);//태스크 핸들

     xTaskCreateEnergy(TaskB,//태스크를 실행할 함수 포인터
     "TaskB",//태스크 이름
     1024,//스택 크기  word
     ( void * ) NULL,//태스크의 매개변수
     Priority_B,//우선순위
     NULL,
     EnergyConsumption_B,
     "B",
     1000,
     60);//태스크 핸들);//태스크 핸들
 }

 static void TaskA(void * pvParam)
 {
     //xComPortHandle xPort;
   //     /* Initialise the UART. */
    // xPort = xSerialPortInitMinimal( configCLI_BAUD_RATE, cmdQUEUE_LENGTH );

     /* Send the welcome message. */
     //vSerialPutString( xPort, ( signed char * ) pcWelcomeMessage, ( unsigned short ) strlen( pcWelcomeMessage ) );
    // vSerialPutString( xPort, ( signed char * ) pcWelcomeMessage1, ( unsigned short ) strlen( pcWelcomeMessage1 ) );
     //vPrintString(pcWelcomeMessage);

     while(1)
     {
         vTaskDelay(100);
     }
 }
 static void TaskB(void * pvParam)
 {

     while(1)
     {
         vParTestToggleLED( mainTASK_LED );
         vTaskDelay(100);

    }
 }

