Optimised Taster.c

This commit is contained in:
_N0x 2021-10-28 17:11:55 +02:00
parent 8cd2a63ce5
commit 578a2fd693

View File

@ -9,14 +9,14 @@ void Taster_init(void){
}
uint8_t Taster1_get(void){
return PIND&(1<<7);
return ((PIND & (1<<PIND7)) == 0);
}
uint8_t Taster2_get(void){
return PIND&(1<<6);
return ((PIND & (1<<PIND6)) == 0);
}
uint8_t Taster3_get(void){
return PIND&(1<<5);
return ((PIND & (1<<PIND5)) == 0);
}
uint8_t Taster4_get(void){
return PINC&(1<<2);
return ((PINC & (1<<PINC2)) == 0);
}