Code:
#include "avrlab.h"
#include "gpio.h"
int press;


//#define SIMULATION


int main(void)
{
  AvrLabInit();
  //your code goes here 
  PortB.DataDirection.Bit3 = DataDirectionOutput;
  PortB.DataDirection.Bit5 = DataDirectionInput;
  PortB.Output.Bit5 = 1;
  PortB.Output.Bit2 = 1;
  PortB.DataDirection.Bit2 = DataDirectionInput;

  while (1)
    {
	
      [hier]if (PortB.Input.Bit5 == 0)
	  press = 1  
      if (PortB.Input.Bit2 == 0) && press == 1
	  press = 0

	  if press == 1 
	  PortB.Output.Bit3 = 1
	  if press == 0
	  PortB.Output.Bit3 = 0
	   

     

       
      AvrLabPoll(); //must be called at least every 40 ms
                     //muss mindestens alle 40 ms aufgerufen werden  
     }
}
Ich habe ein Problem anscheinend soll vor dem If das ich gekennzeichnet habe ein semikolon stehen.
Ich zietiere:
../main.c:24: error: expected ';' before 'if'
Aber da ist ja keins. Ich versuche mit dem Skript eine Lampe mit dem ersten schalter an und mit dem 2. aus zu schalten.