#include <avr/io.h>
#include <stdint.h>

const uint8_t maskaLED = 1 << 5;
const uint8_t maskaSP  = 1 << 7;

int main(void)
{
  DDRB  = maskaLED;  //PB5 je vystup
  PORTB = PORTB | maskaSP;  //zapne pull-up PB7
	
  while (1)
  {
    if(!(PINB & maskaSP))  //test sepnuteho SP
	{
	  PORTB = PORTB | maskaLED;	  //rozsvit LED
    }
	else
	{
	  PORTB = PORTB & ~maskaLED;  //zhasni LED
	}
  }
}

