Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
DIOT WIC Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
DIOT WIC Gateware
Commits
fc529788
Commit
fc529788
authored
Feb 20, 2020
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plc_urv: add more programs.
parent
3a54a6b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
plc_demo2.c
sw/plc_urv/plc_demo2.c
+32
-0
plc_mbox_tb.c
sw/plc_urv/plc_mbox_tb.c
+16
-0
No files found.
sw/plc_urv/plc_demo2.c
0 → 100644
View file @
fc529788
#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
;
}
}
sw/plc_urv/plc_mbox_tb.c
0 → 100644
View file @
fc529788
#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
)
{
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment