Optimised Taster.c
This commit is contained in:
parent
8cd2a63ce5
commit
578a2fd693
@ -9,14 +9,14 @@ void Taster_init(void){
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint8_t Taster1_get(void){
|
uint8_t Taster1_get(void){
|
||||||
return PIND&(1<<7);
|
return ((PIND & (1<<PIND7)) == 0);
|
||||||
}
|
}
|
||||||
uint8_t Taster2_get(void){
|
uint8_t Taster2_get(void){
|
||||||
return PIND&(1<<6);
|
return ((PIND & (1<<PIND6)) == 0);
|
||||||
}
|
}
|
||||||
uint8_t Taster3_get(void){
|
uint8_t Taster3_get(void){
|
||||||
return PIND&(1<<5);
|
return ((PIND & (1<<PIND5)) == 0);
|
||||||
}
|
}
|
||||||
uint8_t Taster4_get(void){
|
uint8_t Taster4_get(void){
|
||||||
return PINC&(1<<2);
|
return ((PINC & (1<<PINC2)) == 0);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user