#include "DSP2833x_Device.h"     // DSP2833x Headerfile Include File
#include "F28335_example.h"


//LED0~10*****************************//
void led0()
{
    EALLOW;
    GpioDataRegs.GPBSET.bit.GPIO49=1;
	GpioDataRegs.GPBSET.bit.GPIO50=1;
	GpioDataRegs.GPBSET.bit.GPIO51=1;
	GpioDataRegs.GPBSET.bit.GPIO55=1;
    GpioDataRegs.GPBSET.bit.GPIO56=1;
    GpioDataRegs.GPASET.bit.GPIO28=1;
    GpioDataRegs.GPBSET.bit.GPIO34=1;
    GpioDataRegs.GPBSET.bit.GPIO35=1;
    GpioDataRegs.GPBSET.bit.GPIO37=1;
    GpioDataRegs.GPBSET.bit.GPIO41=1;
	EDIS;
}

void led1(void)
{
    EALLOW;
	GpioDataRegs.GPBCLEAR.bit.GPIO49=1;
	EDIS;
}
void led2(void)
{
    EALLOW;
	GpioDataRegs.GPBCLEAR.bit.GPIO49=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO50=1;
	EDIS;
}
void led3(void)
{
    EALLOW;
	GpioDataRegs.GPBCLEAR.bit.GPIO49=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO50=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO51=1;
	EDIS;
}

void led4(void)
{
    EALLOW;
    GpioDataRegs.GPBCLEAR.bit.GPIO49=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO50=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO51=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO55=1;
	EDIS;
}
void led5(void)
{
    EALLOW;
    GpioDataRegs.GPBCLEAR.bit.GPIO49=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO50=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO51=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO55=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO56=1;
	EDIS;
}
void led6(void)
{
    EALLOW;
	GpioDataRegs.GPBCLEAR.bit.GPIO49=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO50=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO51=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO55=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO56=1;
    GpioDataRegs.GPACLEAR.bit.GPIO28=1;
	EDIS;
}
void led7(void)
{    
    EALLOW;
	GpioDataRegs.GPBCLEAR.bit.GPIO49=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO50=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO51=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO55=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO56=1;
    GpioDataRegs.GPACLEAR.bit.GPIO28=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO34=1;
	EDIS;
}
void led8(void)
{
    EALLOW;
	GpioDataRegs.GPBCLEAR.bit.GPIO49=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO50=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO51=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO55=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO56=1;
    GpioDataRegs.GPACLEAR.bit.GPIO28=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO34=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO35=1;
	EDIS;
}
void led9(void)
{   
    EALLOW;
	GpioDataRegs.GPBCLEAR.bit.GPIO49=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO50=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO51=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO55=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO56=1;
    GpioDataRegs.GPACLEAR.bit.GPIO28=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO34=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO35=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO37=1;
	EDIS;
}
void led10(void)
{   EALLOW;
	GpioDataRegs.GPBCLEAR.bit.GPIO49=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO50=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO51=1;
	GpioDataRegs.GPBCLEAR.bit.GPIO55=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO56=1;
    GpioDataRegs.GPACLEAR.bit.GPIO28=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO34=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO35=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO37=1;
    GpioDataRegs.GPBCLEAR.bit.GPIO41=1;
	EDIS;
}

void led(int num)
{
	if(num==0)led0();
	if(num==1)led1();
    if(num==2)led2();
	if(num==3)led3();
	if(num==4)led4();
	if(num==5)led5();
	if(num==6)led6();
	if(num==7)led7();
	if(num==8)led8();
	if(num==9)led9();
	if(num==10)led10();
	
}
