Commit fc529788 authored by Tristan Gingold's avatar Tristan Gingold

plc_urv: add more programs.

parent 3a54a6b8
#include <stdint.h>
#include "plc_urv_regs.h"
#define SLOT pins_4
unsigned count;
void
init (void)
{
volatile struct plc_urv_regs *regs =
(volatile struct plc_urv_regs *)0x100000;
regs->relays.SLOT = 0;
count = 0;
}
void
main (void)
{
volatile struct plc_urv_regs *regs =
(volatile struct plc_urv_regs *)0x100000;
count++;
if (count == 500000) {
count = 0;
unsigned v = regs->loops.SLOT;
regs->relays.SLOT = v << 1;
}
}
#include <stdint.h>
#include "plc_urv_regs.h"
void
init (void)
{
volatile struct plc_urv_regs *regs =
(volatile struct plc_urv_regs *)0x100000;
regs->mailboxes.mboxout = 0x12345678;
}
void
main (void)
{
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment