spirack 0.2.10__tar.gz → 0.2.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {spirack-0.2.10 → spirack-0.2.12}/PKG-INFO +1 -1
- {spirack-0.2.10 → spirack-0.2.12}/spirack/D4a_module.py +13 -5
- spirack-0.2.12/spirack/version.py +1 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack.egg-info/PKG-INFO +1 -1
- spirack-0.2.10/spirack/version.py +0 -1
- {spirack-0.2.10 → spirack-0.2.12}/LICENSE +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/README.md +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/setup.cfg +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/setup.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/B1b_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/B2b_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/D4_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/D4b_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/D5a_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/D5b_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/F1d_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/M2j_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/M2p_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/P2d_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/S4g_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/S5i_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/S5k_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/S5l_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/U1c_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/U2_module.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/__init__.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/chip_mode.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack/spi_rack.py +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack.egg-info/SOURCES.txt +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack.egg-info/dependency_links.txt +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack.egg-info/requires.txt +0 -0
- {spirack-0.2.10 → spirack-0.2.12}/spirack.egg-info/top_level.txt +0 -0
|
@@ -42,7 +42,7 @@ class D4a_module(object):
|
|
|
42
42
|
module (int): module number set on the hardware
|
|
43
43
|
"""
|
|
44
44
|
self.file = os.path.abspath(__file__)
|
|
45
|
-
print("D4a initialized.\
|
|
45
|
+
print("D4a initialized.\nPath to D4a file is", self.file,"\n") # debug only
|
|
46
46
|
|
|
47
47
|
self.module = module
|
|
48
48
|
self.spi_rack = spi_rack
|
|
@@ -89,6 +89,7 @@ class D4a_module(object):
|
|
|
89
89
|
self.config_led(adc, 0)
|
|
90
90
|
|
|
91
91
|
self.SR_OEb = 0 # initializing the SR output_enable\ to 'enabled'
|
|
92
|
+
self.set_output_enable(self.SR_OEb)
|
|
92
93
|
|
|
93
94
|
def continuous_conversion_trig_and_read(self, adc):
|
|
94
95
|
"""Perform a conversion
|
|
@@ -165,11 +166,18 @@ class D4a_module(object):
|
|
|
165
166
|
"""
|
|
166
167
|
running = True
|
|
167
168
|
while running:
|
|
168
|
-
status = self.
|
|
169
|
+
status = self._read_RDYb_bit(adc)
|
|
169
170
|
# if new data available:
|
|
170
|
-
if
|
|
171
|
+
if status == 0:
|
|
171
172
|
running = False
|
|
172
173
|
return
|
|
174
|
+
|
|
175
|
+
def _read_RDYb_bit(self, adc):
|
|
176
|
+
"""reads out the RDYb bit from the specified ADC
|
|
177
|
+
"""
|
|
178
|
+
status = self._read_data(adc, self.reg.STATUS_REG, 1)
|
|
179
|
+
RDYb = status[0]&0x80
|
|
180
|
+
return RDYb
|
|
173
181
|
|
|
174
182
|
def force_immediate_read_out(self, adc):
|
|
175
183
|
"""Reads the ADC data output register, regardless of its RDY/complete status
|
|
@@ -970,13 +978,13 @@ class D4a_module(object):
|
|
|
970
978
|
if user_sync_value not in range(0, 2):
|
|
971
979
|
raise ValueError('The sync_value given {} is not a legal value. Possible values are in {}'.format(user_sync_value, range(0, 2)))
|
|
972
980
|
|
|
973
|
-
print("sync_signal from user is ",bytearray([user_sync_value]))
|
|
981
|
+
print("set_sync_signal:\n sync_signal from user is ",bytearray([user_sync_value]))
|
|
974
982
|
|
|
975
983
|
# The output byte holds two bits:
|
|
976
984
|
# The 'SR_OEb' - the existing SR_OEb kept in memory
|
|
977
985
|
# The trig/sync - the new user_sync_value given here explicitly by the user
|
|
978
986
|
output_byte = self.SR_OEb<<7|user_sync_value
|
|
979
|
-
print("The output_byte from BIC to module is",output_byte)
|
|
987
|
+
print(" The output_byte from BIC to module is",output_byte)
|
|
980
988
|
|
|
981
989
|
# Write to SPI addr 5 - the GPIO output direction
|
|
982
990
|
self.spi_rack.write_data(self.module, 5, 0, BICPINS_SPEED, bytearray([output_byte]))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.2.12'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '0.2.10'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|