#include "hardware_dependent.h"
void setup() {
// put your setup code here, to run once:
init_port();
}
void loop() {
// put your main code here, to run repeatedly:
volatile int16_t x;
volatile int y;
x=input();
if(x==0b00000001)//0th switch
{
y=0b10000000;//
output(y);
}
else if(x==0b00000010)//1st switch
{
y=0b01000000;
output(y);
}
else if(x==0b00000100)//2nd switch
{
y=0b00100000;
output(y);
}
else if(x==0b00001000)//3rd switch
{
y=0b00010000;
output(y);
}
else if(x==0b00010000)//4th switch
{
y=0b00001000;
output(y);
}
else if(x==0b00100000)//5th switch
{
y=0b00000100;
output(y);
}
else if(x==0b01000000)//6th switch
{
y=0b00000010;
output(y);
}
else if(x==0b10000000)//7th switch
{
y=0b00000001;
output(y);
}
else
{
y=0b00000000;
output(y);
}
}