Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
Beam Positoning Monitor - 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
Beam Positoning Monitor - Gateware
Commits
e5835cfb
Commit
e5835cfb
authored
Oct 29, 2012
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
embedded-sw/*: add simple regs definitions
parent
d7bfa3cf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
fmc150.c
embedded-sw/dev/fmc150.c
+5
-3
regs.h
embedded-sw/include/regs.h
+15
-0
regs.c
embedded-sw/regs/regs.c
+0
-0
No files found.
embedded-sw/dev/fmc150.c
View file @
e5835cfb
...
...
@@ -145,8 +145,8 @@ fmc150_t *fmc150;
int
fmc150_init
(
void
)
{
if
(
fmc150_devl
->
devices
){
//if (BASE_
GPIO
){
// get first
gpio
device found
//if (BASE_
FMC150
){
// get first
fmc150
device found
fmc150
=
(
fmc150_t
*
)
fmc150_devl
->
devices
->
base
;
//BASE_FMC150;
return
0
;
}
...
...
@@ -231,6 +231,8 @@ static int fmc150_spi_busy_loop()
return
0
;
}
// TODO: implement a register structure and associate permissions
// (RO, RW, WO)
int
init_cdce72010
()
{
int
i
;
...
...
@@ -238,7 +240,7 @@ int init_cdce72010()
/* Write regs to cdce72010 statically */
// Do not write the last register, as it is Read-only
for
(
i
=
0
;
i
<
CDCE72010_NUMREGS
-
1
;
++
i
){
for
(
i
=
0
;
i
<
CDCE72010_NUMREGS
;
++
i
){
if
(
fmc150_spi_busy_loop
()
<
0
){
dbg_print
(
"init_cdce72010: max SPI tries excceded!
\n
"
);
return
-
1
;
...
...
embedded-sw/include/regs.h
0 → 100644
View file @
e5835cfb
/*
* Copyright (C) 2012 LNLS (www.lnls.br)
* Author: Lucas Russo <lucas.russo@lnls.br>
*
* Released according to the GNU GPL, version 2 or any later version.
*/
#ifndef _REGS_H_
#define _REGS_H_
#define READ_ONLY 0x1
#define WRITE_ONLY 0x2
#define READ_WRITE (READ_ONLY | WRITE_ONLY)
#endif
embedded-sw/regs/regs.c
0 → 100644
View file @
e5835cfb
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