dac: fix initialization order #67

Merged
sb10q merged 1 commits from fsagbuya/nix-servo:dac_fix into master 2024-08-20 16:39:01 +08:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit 15a66c01fa - Show all commits

View File

@ -127,13 +127,13 @@ def configure_ad9117():
configure_dac(spi)
dac_self_calibration(spi)
# Enable DAC outputs
spi_write(spi, 0x01, spi_read(spi, 0x01) & ~((1 << 4) | (1 << 3)))
power_down(0, False)
power_down(1, False)
manual_override(True)
# Enable DAC outputs
spi_write(spi, 0x01, spi_read(spi, 0x01) & ~((1 << 4) | (1 << 3)))
print("AD9117 configuration completed successfully")
return True