pyfastservo dac: hard_reset -> soft_reset
This commit is contained in:
parent
5d55ab4c9c
commit
51c8b755d2
@ -45,7 +45,7 @@ def spi_read(spi, address):
|
||||
rx_buffer = spi.xfer2([0x80 | address, 0x00])
|
||||
return rx_buffer[1]
|
||||
|
||||
def hard_reset(spi):
|
||||
def soft_reset(spi):
|
||||
spi_write(spi, 0x00, 0x10) # Software reset
|
||||
spi_write(spi, 0x00, 0x00) # Release software reset
|
||||
spi_read(spi, 0x00) # Read reset address (necessary for reset to take effect)
|
||||
@ -132,7 +132,7 @@ def configure_ad9117():
|
||||
spi.cshigh = False
|
||||
|
||||
try:
|
||||
hard_reset(spi)
|
||||
soft_reset(spi)
|
||||
if not check_version(spi):
|
||||
print("Unrecognized DAC version")
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user