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.
Files changed (32) hide show
  1. {spirack-0.2.10 → spirack-0.2.12}/PKG-INFO +1 -1
  2. {spirack-0.2.10 → spirack-0.2.12}/spirack/D4a_module.py +13 -5
  3. spirack-0.2.12/spirack/version.py +1 -0
  4. {spirack-0.2.10 → spirack-0.2.12}/spirack.egg-info/PKG-INFO +1 -1
  5. spirack-0.2.10/spirack/version.py +0 -1
  6. {spirack-0.2.10 → spirack-0.2.12}/LICENSE +0 -0
  7. {spirack-0.2.10 → spirack-0.2.12}/README.md +0 -0
  8. {spirack-0.2.10 → spirack-0.2.12}/setup.cfg +0 -0
  9. {spirack-0.2.10 → spirack-0.2.12}/setup.py +0 -0
  10. {spirack-0.2.10 → spirack-0.2.12}/spirack/B1b_module.py +0 -0
  11. {spirack-0.2.10 → spirack-0.2.12}/spirack/B2b_module.py +0 -0
  12. {spirack-0.2.10 → spirack-0.2.12}/spirack/D4_module.py +0 -0
  13. {spirack-0.2.10 → spirack-0.2.12}/spirack/D4b_module.py +0 -0
  14. {spirack-0.2.10 → spirack-0.2.12}/spirack/D5a_module.py +0 -0
  15. {spirack-0.2.10 → spirack-0.2.12}/spirack/D5b_module.py +0 -0
  16. {spirack-0.2.10 → spirack-0.2.12}/spirack/F1d_module.py +0 -0
  17. {spirack-0.2.10 → spirack-0.2.12}/spirack/M2j_module.py +0 -0
  18. {spirack-0.2.10 → spirack-0.2.12}/spirack/M2p_module.py +0 -0
  19. {spirack-0.2.10 → spirack-0.2.12}/spirack/P2d_module.py +0 -0
  20. {spirack-0.2.10 → spirack-0.2.12}/spirack/S4g_module.py +0 -0
  21. {spirack-0.2.10 → spirack-0.2.12}/spirack/S5i_module.py +0 -0
  22. {spirack-0.2.10 → spirack-0.2.12}/spirack/S5k_module.py +0 -0
  23. {spirack-0.2.10 → spirack-0.2.12}/spirack/S5l_module.py +0 -0
  24. {spirack-0.2.10 → spirack-0.2.12}/spirack/U1c_module.py +0 -0
  25. {spirack-0.2.10 → spirack-0.2.12}/spirack/U2_module.py +0 -0
  26. {spirack-0.2.10 → spirack-0.2.12}/spirack/__init__.py +0 -0
  27. {spirack-0.2.10 → spirack-0.2.12}/spirack/chip_mode.py +0 -0
  28. {spirack-0.2.10 → spirack-0.2.12}/spirack/spi_rack.py +0 -0
  29. {spirack-0.2.10 → spirack-0.2.12}/spirack.egg-info/SOURCES.txt +0 -0
  30. {spirack-0.2.10 → spirack-0.2.12}/spirack.egg-info/dependency_links.txt +0 -0
  31. {spirack-0.2.10 → spirack-0.2.12}/spirack.egg-info/requires.txt +0 -0
  32. {spirack-0.2.10 → spirack-0.2.12}/spirack.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spirack
3
- Version: 0.2.10
3
+ Version: 0.2.12
4
4
  Summary: Drivers for the QuTech SPI-rack
5
5
  Home-page: https://github.com/mtiggelman/SPI-rack
6
6
  Author: Marijn Tiggelman
@@ -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.\nFile path is", self.file,"\n") # debug only
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._read_data(adc, self.reg.STATUS_REG, 1)
169
+ status = self._read_RDYb_bit(adc)
169
170
  # if new data available:
170
- if (status[0]&0x80) == 0:
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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spirack
3
- Version: 0.2.10
3
+ Version: 0.2.12
4
4
  Summary: Drivers for the QuTech SPI-rack
5
5
  Home-page: https://github.com/mtiggelman/SPI-rack
6
6
  Author: Marijn Tiggelman
@@ -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