#include <stdint.h>
#include "app_urv_regs.h"

#define SLOT pins_4

void
init (void)
{
  volatile struct app_urv_regs *regs =
    (volatile struct app_urv_regs *)0x00000;

  regs->relays.SLOT = 0;
}

void
main (void)
{
  volatile struct app_urv_regs *regs =
    (volatile struct app_urv_regs *)0x00000;

  while (1) {
  unsigned v = regs->loops.SLOT;

  regs->relays.SLOT = -(v & 1) & (~1);
  }
}
