aboutsummaryrefslogtreecommitdiffstats
path: root/examples/test-dac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/test-dac.cpp')
-rw-r--r--examples/test-dac.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/test-dac.cpp b/examples/test-dac.cpp
index 3a699e2..62f40eb 100644
--- a/examples/test-dac.cpp
+++ b/examples/test-dac.cpp
@@ -16,7 +16,7 @@ void setup() {
Serial1.println("**** Beginning DAC test");
Serial1.print("Init... ");
- dac_init();
+ dac_init(DAC_CH1 | DAC_CH2);
Serial1.println("Done.");
}
@@ -29,8 +29,8 @@ void loop() {
count = 0;
}
- dac_write(1, 2048);
- dac_write(2, count);
+ dac_write_channel(1, 4095 - count);
+ dac_write_channel(2, count);
}
int main(void) {