#include "TYW_stdint.h"
#include "GPIO.h"
#include "Signal_Remap.h"
#include "RTE_PWM.h"
#include "TimerB.h"
#include "RTE_GPIO.h"




void SetIO_OUT_P_01(uint8_t val)
{
    IO_OUT_P_01 = val;
}
void SetIO_OUT_P_02(uint8_t val)
{
    IO_OUT_P_02 = val;
}
void SetIO_OUT_P_03(uint8_t val)
{
    IO_OUT_P_03 = val;
}
void SetIO_OUT_P_04(uint8_t val)
{
    IO_OUT_P_04 = val;
}
void SetIO_OUT_P_05(uint8_t val)
{
    IO_OUT_P_05 = val;
}
void SetIO_OUT_P_06(uint8_t val)
{
    IO_OUT_P_06 = val;
}
void SetIO_OUT_P_07(uint8_t val)
{
    IO_OUT_P_07 = val;
}
void SetIO_OUT_P_08(uint8_t val)
{
    IO_OUT_P_08 = val;
}
void SetIO_OUT_P_09(uint8_t val)
{
    IO_OUT_P_09 = val;
}
void SetIO_OUT_P_10(uint8_t val)
{
    IO_OUT_P_10 = val;
}
void SetIO_OUT_N_01(uint8_t val)
{
    IO_OUT_N_01 = val;
}
void SetIO_OUT_N_02(uint8_t val)
{
    IO_OUT_N_02 = val;
}
void SetIO_OUT_N_03(uint8_t val)
{
    IO_OUT_N_03 = val;
}
void SetIO_OUT_N_04(uint8_t val)
{
    IO_OUT_N_04 = val;
}
void SetIO_OUT_N_05(uint8_t val)
{
    IO_OUT_N_05 = val;
}
void SetIO_OUT_N_06(uint8_t val)
{
    IO_OUT_N_06 = val;
}
void SetIO_OUT_N_07(uint8_t val)
{
    IO_OUT_N_07 = val;
}
void SetIO_OUT_N_08(uint8_t val)
{
    IO_OUT_N_08 = val;
}
void SetIO_OUT_N_09(uint8_t val)
{
    IO_OUT_N_09 = val;
}
void SetIO_OUT_N_10(uint8_t val)
{
    IO_OUT_N_10 = val;
}

void SetPWM_OUT_01(uint32_t Duty, uint32_t Freq)
{
    PWM_Channel_Set_Freq(1, Freq);
    PWM_Channel_Set_Duty(1, Duty);
}
//void SetPWM_OUT_02(uint32_t Duty, uint32_t Freq)
//{
//    PWM_Channel_Set_Freq(3, Freq);
//    PWM_Channel_Set_Duty(3, Duty);
//}
void SetPWM_OUT_03(uint32_t Duty, uint32_t Freq)
{
    PWM_Channel_Set_Freq(3, Freq);
    PWM_Channel_Set_Duty(3, Duty);
}
//void SetPWM_OUT_04(uint32_t Duty, uint32_t Freq)
//{
//    PWM_Channel_Set_Freq(2, Freq);
//    PWM_Channel_Set_Duty(2, Duty);
//}
void SetPWM_OUT_05(uint32_t Duty, uint32_t Freq)
{
    PWM_Channel_Set_Freq(5, Freq);
    PWM_Channel_Set_Duty(5, Duty);
}
//void SetPWM_OUT_06(uint32_t Duty, uint32_t Freq)
//{
//    PWM_Channel_Set_Freq(2, Freq);
//    PWM_Channel_Set_Duty(2, Duty);
//}
void SetPWM_OUT_07(uint32_t Duty, uint32_t Freq)
{
    PWM_Channel_Set_Freq(7, Freq);
    PWM_Channel_Set_Duty(7, Duty);
}
//void SetPWM_OUT_08(uint32_t Duty, uint32_t Freq)
//{
//    PWM_Channel_Set_Freq(2, Freq);
//    PWM_Channel_Set_Duty(2, Duty);
//}
void SetPWM_OUT_09(uint32_t Duty, uint32_t Freq)
{
    PWM_Channel_Set_Freq(9, Freq);
    PWM_Channel_Set_Duty(9, Duty);
}
//void SetPWM_OUT_10(uint32_t Duty, uint32_t Freq)
//{
//    PWM_Channel_Set_Freq(2, Freq);
//    PWM_Channel_Set_Duty(2, Duty);
//}
void SetPWM_OUT_11(uint32_t Duty, uint32_t Freq)
{
    PWM_Channel_Set_Freq(11, Freq);
    PWM_Channel_Set_Duty(11, Duty);
}
//void SetPWM_OUT_12(uint32_t Duty, uint32_t Freq)
//{
//    PWM_Channel_Set_Freq(2, Freq);
//    PWM_Channel_Set_Duty(2, Duty);
//}
void SetPWM_OUT_13(uint32_t Duty, uint32_t Freq)
{
    PWM_Channel_Set_Freq(13, Freq);
    PWM_Channel_Set_Duty(13, Duty);
}
//void SetPWM_OUT_14(uint32_t Duty, uint32_t Freq)
//{
//    PWM_Channel_Set_Freq(2, Freq);
//    PWM_Channel_Set_Duty(2, Duty);
//}
void SetPWM_OUT_15(uint32_t Duty, uint32_t Freq)
{
    PWM_Channel_Set_Freq(15, Freq);
    PWM_Channel_Set_Duty(15, Duty);
}
//void SetPWM_OUT_16(uint32_t Duty, uint32_t Freq)
//{
//    PWM_Channel_Set_Freq(2, Freq);
//    PWM_Channel_Set_Duty(2, Duty);
//}


void SetPWM_IN_01(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_02(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_03(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_04(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_05(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_06(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_07(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_08(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_09(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_10(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_11(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_12(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_13(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_14(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_15(uint32_t Duty, uint32_t Freq)
{

}
void SetPWM_IN_16(uint32_t Duty, uint32_t Freq)
{

}


void SetIO_OUT_P_01(uint8_t val);
void SetIO_OUT_P_02(uint8_t val);
void SetIO_OUT_P_03(uint8_t val);
void SetIO_OUT_P_04(uint8_t val);
void SetIO_OUT_P_05(uint8_t val);
void SetIO_OUT_P_06(uint8_t val);
void SetIO_OUT_P_07(uint8_t val);
void SetIO_OUT_P_08(uint8_t val);
void SetIO_OUT_P_09(uint8_t val);
void SetIO_OUT_P_10(uint8_t val);
void SetIO_OUT_N_01(uint8_t val);
void SetIO_OUT_N_02(uint8_t val);
void SetIO_OUT_N_03(uint8_t val);
void SetIO_OUT_N_04(uint8_t val);
void SetIO_OUT_N_05(uint8_t val);
void SetIO_OUT_N_06(uint8_t val);
void SetIO_OUT_N_07(uint8_t val);
void SetIO_OUT_N_08(uint8_t val);
void SetIO_OUT_N_09(uint8_t val);
void SetIO_OUT_N_10(uint8_t val);

void SetPWM_OUT_01(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_02(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_03(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_04(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_05(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_06(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_07(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_08(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_09(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_10(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_11(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_12(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_13(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_14(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_15(uint32_t Duty, uint32_t Freq);
void SetPWM_OUT_16(uint32_t Duty, uint32_t Freq);

void SetPWM_IN_01(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_02(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_03(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_04(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_05(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_06(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_07(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_08(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_09(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_10(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_11(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_12(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_13(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_14(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_15(uint32_t Duty, uint32_t Freq);
void SetPWM_IN_16(uint32_t Duty, uint32_t Freq);

const st_Port_IO F1KM_16843_Port_IO_P [20] = {
    &SetIO_OUT_P_01,
    &SetIO_OUT_P_02,
    &SetIO_OUT_P_03,
    &SetIO_OUT_P_04,
    &SetIO_OUT_P_05,
    &SetIO_OUT_P_06,
    &SetIO_OUT_P_07,
    &SetIO_OUT_P_08,
    &SetIO_OUT_P_09,
    &SetIO_OUT_P_10,
    &SetIO_OUT_N_01,
    &SetIO_OUT_N_02,
    &SetIO_OUT_N_03,
    &SetIO_OUT_N_04,
    &SetIO_OUT_N_05,
    &SetIO_OUT_N_06,
    &SetIO_OUT_N_07,
    &SetIO_OUT_N_08,
    &SetIO_OUT_N_09,
    &SetIO_OUT_N_10,
};
const st_Port_PWM F1KM_16843_Port_PWM_Out [8] = {
    &SetPWM_OUT_01,
    //&SetPWM_OUT_02,
    &SetPWM_OUT_03,
    //&SetPWM_OUT_04,
    &SetPWM_OUT_05,
    //&SetPWM_OUT_06,
    &SetPWM_OUT_07,
    //&SetPWM_OUT_08,
    &SetPWM_OUT_09,
    //&SetPWM_OUT_10,
    &SetPWM_OUT_11,
    //&SetPWM_OUT_12,
    &SetPWM_OUT_13,
    //&SetPWM_OUT_14,
    &SetPWM_OUT_15,
    //&SetPWM_OUT_16,
};

const st_Port_PWM F1KM_16843_Port_PWM_IN [8] = {
    &SetPWM_IN_01,
    //&SetPWM_IN_02,
    &SetPWM_IN_03,
    //&SetPWM_IN_04,
    &SetPWM_IN_05,
    //&SetPWM_IN_06,
    &SetPWM_IN_07,
   //&SetPWM_IN_08,
    &SetPWM_IN_09,
    //&SetPWM_IN_10,
    &SetPWM_IN_11,
    //&SetPWM_IN_12,
    &SetPWM_IN_13,
    //&SetPWM_IN_14,
    &SetPWM_IN_15,
    //&SetPWM_IN_16,
};

