/*
 * gpio_init.c
 *
 *  Created on: 4 ����. 2023 �.
 *      Author: seklyuts
 */
#include "f28x_project.h"

void GpioInit(void)
{
    EALLOW;
//    GpioCtrlRegs.GPAMUX2.bit.GPIO20 = 0;
//    GpioCtrlRegs.GPAGMUX2.bit.GPIO20 = 0;
//    GpioCtrlRegs.GPADIR.bit.GPIO20 = 1;
//    GpioDataRegs.GPADAT.bit.GPIO20 = 0;
//
//    GpioCtrlRegs.GPAMUX2.bit.GPIO21 = 0;
//    GpioCtrlRegs.GPAGMUX2.bit.GPIO21 = 0;
//    GpioCtrlRegs.GPADIR.bit.GPIO21 = 1;
//    GpioDataRegs.GPADAT.bit.GPIO21 = 0;


/*    GpioCtrlRegs.GPBMUX2.bit.GPIO54 = 0;
    GpioCtrlRegs.GPBGMUX2.bit.GPIO54 = 0;
    GpioCtrlRegs.GPBDIR.bit.GPIO54 = 1;
    GpioDataRegs.GPBDAT.bit.GPIO54 = 0;

    GpioCtrlRegs.GPBMUX2.bit.GPIO55 = 0;
    GpioCtrlRegs.GPBGMUX2.bit.GPIO55 = 0;
    GpioCtrlRegs.GPBDIR.bit.GPIO55 = 1;
    GpioDataRegs.GPBDAT.bit.GPIO55 = 0;

    GpioCtrlRegs.GPBMUX2.bit.GPIO56 = 0;
    GpioCtrlRegs.GPBGMUX2.bit.GPIO56 = 0;
    GpioCtrlRegs.GPBDIR.bit.GPIO56 = 1;
    GpioDataRegs.GPBDAT.bit.GPIO56 = 0;*/

    GpioCtrlRegs.GPBMUX2.bit.GPIO57 = 0;
    GpioCtrlRegs.GPBGMUX2.bit.GPIO57 = 0;
    GpioCtrlRegs.GPBDIR.bit.GPIO57 = 0;
    GpioDataRegs.GPBDAT.bit.GPIO57 = 0;



    GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 0;
    GpioCtrlRegs.GPAGMUX2.bit.GPIO18 = 0;
    GpioCtrlRegs.GPADIR.bit.GPIO18 = 0;

    GpioCtrlRegs.GPAMUX2.bit.GPIO19 = 0;
    GpioCtrlRegs.GPAGMUX2.bit.GPIO19 = 0;
    GpioCtrlRegs.GPADIR.bit.GPIO19 = 0;

    GpioCtrlRegs.GPCMUX2.bit.GPIO90 = 0;
    GpioCtrlRegs.GPCGMUX2.bit.GPIO90 = 0;
    GpioCtrlRegs.GPCDIR.bit.GPIO90 = 0;

    GpioCtrlRegs.GPCMUX2.bit.GPIO92 = 0;
    GpioCtrlRegs.GPCGMUX2.bit.GPIO92 = 0;
    GpioCtrlRegs.GPCDIR.bit.GPIO92 = 0;

    GpioCtrlRegs.GPCMUX2.bit.GPIO94 = 0;
    GpioCtrlRegs.GPCGMUX2.bit.GPIO94 = 0;
    GpioCtrlRegs.GPCDIR.bit.GPIO94 = 0;

    GpioCtrlRegs.GPEMUX2.bit.GPIO147 = 0;
    GpioCtrlRegs.GPEGMUX2.bit.GPIO147 = 0;
    GpioCtrlRegs.GPEDIR.bit.GPIO147 = 0;

    GpioCtrlRegs.GPDMUX1.bit.GPIO103 = 0;
    GpioCtrlRegs.GPDGMUX1.bit.GPIO103 = 0;
    GpioCtrlRegs.GPDDIR.bit.GPIO103 = 0;
    GpioDataRegs.GPDDAT.bit.GPIO103 = 0;


    EDIS;
}

//void Gpio20out(uint16_t out_bit)
//{
//        GpioDataRegs.GPADAT.bit.GPIO20 = out_bit;
//}
//
//void Gpio21out(uint16_t out_bit)
//{
//        GpioDataRegs.GPADAT.bit.GPIO21 = out_bit;
//}


void Gpio54out(uint16_t out_bit)
{
        GpioDataRegs.GPBDAT.bit.GPIO54 = out_bit;
}

void Gpio55out(uint16_t out_bit)
{
        GpioDataRegs.GPBDAT.bit.GPIO55 = out_bit;
}

void Gpio56out(uint16_t out_bit)
{
        GpioDataRegs.GPBDAT.bit.GPIO56 = out_bit;
}

void Gpio57out(uint16_t out_bit)
{
        GpioDataRegs.GPBDAT.bit.GPIO57 = out_bit;
}
