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

#define SLOT 7

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

  regs->relays[SLOT].pins = 0;
}

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

  while (1) {
    unsigned v = regs->loops[SLOT].pins;
    regs->relays[SLOT].pins = (v & 1) << 2;
  }
}
