-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ianmalcolm/master
Some updates and bug fixes
- Loading branch information
Showing
5 changed files
with
142 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env python | ||
|
||
import corr,time | ||
|
||
r=corr.katcp_wrapper.FpgaClient('10.1.0.23') | ||
time.sleep(0.1) | ||
r.progdev('test_snap_i2c_2017-03-17_1509.bof') | ||
print '\n'.join(r.listdev()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import smbus | ||
import corr | ||
import i2cSnap | ||
import time | ||
|
||
bus = smbus.SMBus(1) | ||
HOST = '10.1.0.23' | ||
addr = 0x50 | ||
|
||
bus.write_byte(addr,0) | ||
print ("%02x"%bus.read_byte(addr)) | ||
print ("%02x"%bus.read_byte(addr)) | ||
print ("%02x"%bus.read_byte(addr)) | ||
print ("%02x"%bus.read_byte(addr)) | ||
print ("%02x"%bus.read_byte(addr)) | ||
print ("%02x"%bus.read_byte(addr)) | ||
print ("%02x"%bus.read_byte(addr)) | ||
print ("%02x"%bus.read_byte(addr)) | ||
r = corr.katcp_wrapper.FpgaClient(HOST) | ||
time.sleep(0.1) | ||
|
||
i2c = i2cSnap.I2C(r, 'i2c_ant1') | ||
i2c.clockSpeed(100) | ||
|
||
i2c.write_byte(addr, 0) | ||
print i2c.read_bytes(addr,8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters