Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
buspirate-python
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dorota Czaplejewicz
buspirate-python
Commits
acf2c6bc
Commit
acf2c6bc
authored
May 28, 2017
by
juhasch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs fixes
parent
b7af1ac9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
pyBusPirateLite/I2C.py
pyBusPirateLite/I2C.py
+17
-11
No files found.
pyBusPirateLite/I2C.py
View file @
acf2c6bc
...
...
@@ -274,9 +274,9 @@ class I2C(BBIO_base):
0x?? - read position 256 - the requested number of bytes read from the I2C bus
"""
self
.
write
(
0x08
)
self
.
write
(
numtx
>>
8
&
0xff
)
self
.
write
(
numtx
>>
8
&
0xff
)
self
.
write
(
numtx
&
0xff
)
self
.
write
(
numrx
>>
8
&
0xff
)
self
.
write
(
numrx
>>
8
&
0xff
)
self
.
write
(
numrx
&
0xff
)
for
data
in
txdata
:
self
.
write
(
data
)
...
...
@@ -286,15 +286,21 @@ class I2C(BBIO_base):
def
aux
(
self
,
cmd
):
""" Provides extended use of AUX pin. Requires one command byte. Bus Pirate acknowledges 0x01.
Command Function
+-----|------------+
|0x00 | AUX/CS low |
|0x01 | AUX/CS high|
|0x02 | AUX/CS HiZ |
|0x03 | AUX read |
|0x10 | use AUX |
|0x20 | use CS |
+-----|------------+
+--------+------------+
|Command | Function |
+========+============+
| 0x00 | AUX/CS low |
+--------+------------+
| 0x01 | AUX/CS high|
+--------+------------+
| 0x02 | AUX/CS HiZ |
+--------+------------+
| 0x03 | AUX read |
+--------+------------+
| 0x10 | use AUX |
+--------+------------+
| 0x20 | use CS |
+--------+------------+
"""
self
.
write
(
0x09
)
if
cmd
in
[
0x00
,
0x01
,
0x02
,
0x03
,
0x10
,
0x20
]:
...
...
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