pyfastservo dac: power_down -> power_down_afe
This commit is contained in:
parent
51c8b755d2
commit
6705b182d5
|
@ -90,7 +90,7 @@ def manual_override(enable=True):
|
|||
to_write = reg_contents | 0b1 if enable else reg_contents & 0b110
|
||||
write_to_memory(CTRL_ADDR, to_write)
|
||||
|
||||
def power_down(channel, power_down=True):
|
||||
def power_down_afe(channel, power_down=True):
|
||||
assert channel in (0, 1)
|
||||
|
||||
bitmask = 1 << (channel + 1) & 0b111
|
||||
|
@ -137,6 +137,9 @@ def configure_ad9117():
|
|||
print("Unrecognized DAC version")
|
||||
return False
|
||||
|
||||
power_down_afe(0, True)
|
||||
power_down_afe(1, True)
|
||||
|
||||
configure_dac(spi)
|
||||
check_clk_relationship(spi)
|
||||
dac_self_calibration(spi)
|
||||
|
@ -144,8 +147,8 @@ def configure_ad9117():
|
|||
# Enable DAC outputs
|
||||
spi_write(spi, 0x01, spi_read(spi, 0x01) & ~((1 << 4) | (1 << 3)))
|
||||
|
||||
power_down(0, False)
|
||||
power_down(1, False)
|
||||
power_down_afe(0, False)
|
||||
power_down_afe(1, False)
|
||||
manual_override(False)
|
||||
|
||||
print("AD9117 configuration completed successfully")
|
||||
|
|
Loading…
Reference in New Issue