Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
V
vSPI
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
vSPI
Commits
99e6df56
Commit
99e6df56
authored
Mar 14, 2012
by
Michael J. Lyons
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fastclock' into xps_proj
parents
7c087d9a
4aa6dcd1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
spilib.py
scripts/master/spilib.py
+1
-1
spitest.py
scripts/master/spitest.py
+13
-1
No files found.
scripts/master/spilib.py
View file @
99e6df56
...
...
@@ -7,7 +7,7 @@ class SpiComm:
_port
=
0
# Change if using multiple Cheetahs
_mode
=
3
# spiifc SPI mode
_bitrate
=
2
79
00
# kbps
_bitrate
=
2
20
00
# kbps
handle
=
None
# handle to Cheetah SPI
...
...
scripts/master/spitest.py
View file @
99e6df56
...
...
@@ -136,6 +136,16 @@ def RegLoopbackTest():
passCount
=
passCount
+
1
print
(
"PASS [
%
d]"
%
(
passCount
))
#
# ReadRegsTest
#
# Reads out the value of all registers
#
def
ReadRegsTest
():
for
regId
in
range
(
16
):
regVal
=
spi
.
ReadReg
(
regId
)
print
(
"Reg
%
d = 0x
%08
x"
%
(
regId
,
regVal
))
#
# PrintCliSyntax:
#
...
...
@@ -150,6 +160,7 @@ Valid tests (case sensitive):
- MultiBytePacketSend
- MemLoopback
- RegLoopback
- ReadRegs
"""
#
...
...
@@ -166,7 +177,8 @@ cliTest = sys.argv[1]
testMapping
=
{
'SingleBytePacketsSend'
:
[
SingleBytePacketsSendTest
],
'MultiBytePacketSend'
:
[
MultiBytePacketSendTest
],
'MemLoopback'
:
[
MemLoopbackTest
],
'RegLoopback'
:
[
RegLoopbackTest
]}
'RegLoopback'
:
[
RegLoopbackTest
],
'ReadRegs'
:
[
ReadRegsTest
]}
if
cliTest
not
in
testMapping
:
sys
.
stderr
.
write
(
'
%
s is not a valid test.
\n
'
%
(
cliTest
,))
PrintCliSyntax
()
...
...
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