From c54f98951ea2827598babd4602e0f808b3ee311c Mon Sep 17 00:00:00 2001 From: Perry Hung Date: Sun, 27 Feb 2011 06:38:53 -0500 Subject: Refactor DAC DAC header and source slightly cleaned up. Test on Maple Native prototype. Add flags parameter to allow selective enabling of channels. --- examples/test-dac.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') 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) { -- cgit v1.2.3