Kopiere dir das in die main.c
Alle anderen *.c und *.h Dateien löscht du im linken Fenster mit rechter Maustaste und Delete from Projekt.
Dann muss es sich Fehlerfrei kompilieren lassen.
Das ganze ist zwar nicht schlecht aufgebaut, allerdings bin ich es anders gewohnt und muss da vollkommen umdenken. Daher werde ich mich damit nicht weiter beschäftigen.
Code:
#include "gpio.h"
int press;

int main(void) 
{
  PortB.DataDirection.Bit3 = DataDirectionOutput;
  PortB.DataDirection.Bit5 = DataDirectionInput;
  PortB.Output.Bit5 = 1;
  PortB.Output.Bit2 = 1;
  PortB.DataDirection.Bit2 = DataDirectionInput;

  while (1)
    {
   
      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;}

     }
}