Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyPCC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
PyPCC
Commits
5c8cb61d
Commit
5c8cb61d
authored
3 years ago
by
Paulus Kruger
Browse files
Options
Downloads
Patches
Plain Diff
some bugs fixed
parent
fb088014
No related branches found
No related tags found
1 merge request
!11
Pypcc2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/CLK.yaml
+1
-1
1 addition, 1 deletion
config/CLK.yaml
i2cserv/i2c_dev.py
+2
-1
2 additions, 1 deletion
i2cserv/i2c_dev.py
testCLK.py
+5
-2
5 additions, 2 deletions
testCLK.py
with
8 additions
and
4 deletions
config/CLK.yaml
+
1
−
1
View file @
5c8cb61d
...
@@ -4,7 +4,7 @@ description: "1234"
...
@@ -4,7 +4,7 @@ description: "1234"
drivers
:
drivers
:
-
name
:
I2C
-
name
:
I2C
type
:
i2c
type
:
i2c
parameters
:
[
1
]
#I2C port number
parameters
:
[
4
]
#I2C port number
-
name
:
I2C_CLK
-
name
:
I2C_CLK
type
:
i2c_dev
#I2C devices
type
:
i2c_dev
#I2C devices
parent
:
I2C
parent
:
I2C
...
...
This diff is collapsed.
Click to expand it.
i2cserv/i2c_dev.py
+
2
−
1
View file @
5c8cb61d
...
@@ -110,7 +110,7 @@ class i2c_dev(hwdev):
...
@@ -110,7 +110,7 @@ class i2c_dev(hwdev):
# print("Call Method",var1)
# print("Call Method",var1)
def
i2csetget
(
self
,
*
args
,
**
kwargs
):
def
i2csetget
(
self
,
*
args
,
**
kwargs
):
self
.
conf
[
'
parentcls
'
].
i2csetget
(
*
args
,
**
kwargs
)
return
self
.
conf
[
'
parentcls
'
].
i2csetget
(
*
args
,
**
kwargs
)
def
SetSwitch
(
self
,
RCUi
):
def
SetSwitch
(
self
,
RCUi
):
self
.
conf
[
'
parentcls
'
].
SetSW1
(
self
.
RCU_Switch1
[
RCUi
]);
self
.
conf
[
'
parentcls
'
].
SetSW1
(
self
.
RCU_Switch1
[
RCUi
]);
...
@@ -206,6 +206,7 @@ class i2c_dev(hwdev):
...
@@ -206,6 +206,7 @@ class i2c_dev(hwdev):
if
devreg
[
'
store
'
]:
if
devreg
[
'
store
'
]:
devreg
[
'
storeval
'
]
=
value
[
0
];
devreg
[
'
storeval
'
]
=
value
[
0
];
l1
=
int
(
np
.
floor
((
width
+
bitoffset
+
7
)
/
8
))
l1
=
int
(
np
.
floor
((
width
+
bitoffset
+
7
)
/
8
))
print
(
value
[
0
],
width
,
bitoffset
,
l1
)
if
(
width
!=
l1
*
8
)
or
(
bitoffset
>
0
):
if
(
width
!=
l1
*
8
)
or
(
bitoffset
>
0
):
if
(
width
<
8
):
if
(
width
<
8
):
for
i
in
range
(
len
(
value
)):
for
i
in
range
(
len
(
value
)):
...
...
This diff is collapsed.
Click to expand it.
testCLK.py
+
5
−
2
View file @
5c8cb61d
...
@@ -32,10 +32,13 @@ I2Cclients.append(RCU_I2C)
...
@@ -32,10 +32,13 @@ I2Cclients.append(RCU_I2C)
#Load yaml so that we know the variable names
#Load yaml so that we know the variable names
RCU_conf
=
yamlreader
.
yamlreader
(
RCU_I2C
,
yamlfile
=
name
)
RCU_conf
=
yamlreader
.
yamlreader
(
RCU_I2C
,
yamlfile
=
name
)
var1
=
RCU_conf
.
getvarid
(
'
CLK_PLL_locked_SPI
'
)
var1
=
RCU_conf
.
getvarid
(
'
CLK_PLL_locked
'
)
var1
=
RCU_conf
.
getvarid
(
'
CLK_PLL_r3
'
)
RCU_I2C
.
readvar
(
var1
,[])
RCU_I2C
.
readvar
(
var1
,[])
var1
=
RCU_conf
.
getvarid
(
'
CLK_PLL_locked_SPI
'
)
#var1=RCU_conf.getvarid('CLK_PLL_r3')
#RCU_I2C.readvar(var1,[])
#var1=RCU_conf.getmethodid('CLK_on');
#var1=RCU_conf.getmethodid('CLK_on');
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment