void setup() {
// put your setup code here, to run once:
//here setting the pin to high output
volatile char *dir;
//address
dir=0x30;
//data
*dir|=0xFF;
}
void set(volatile char *out){
*out|=0xFF;
}
void reset(volatile char *out){
*out&=0x00;
}
void loop() {
// put your main code here, to run repeatedly:
volatile char out,y;
out=0x31;
y=&out;
unsigned int res=0;
res=2;
switch(res){
case 1:
set(out);
break;
case 2:
reset(out);
break;
default:
set(out);
break;
}
}