summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2012-09-22 18:02:07 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2012-09-22 18:02:07 +0200
commit2c581cb537b132c66219d7c920969773dc210db5 (patch)
treead6826a2cc14e593c62faf4bf9942f1d22760674
parentf573d559a01ea322d3bfb9f618498fa0637a5f27 (diff)
Configure DAC to act as a slave.
m---------laks0
-rw-r--r--main.cpp3
2 files changed, 2 insertions, 1 deletions
diff --git a/laks b/laks
-Subproject eaf304f02a234171c2b994138f1bc54338dcd97
+Subproject e31ddf951f6dfc052e3387f5c52e671ff14115f
diff --git a/main.cpp b/main.cpp
index c80a885..b335e08 100644
--- a/main.cpp
+++ b/main.cpp
@@ -21,7 +21,7 @@ Pin& usb_vbus = PA9;
Pin& usb_dm = PA11;
Pin& usb_dp = PA12;
-const uint32_t audio_buf_size = 256;
+const uint32_t audio_buf_size = 1024;
uint16_t audio_buf[audio_buf_size];
uint32_t audio_buf_pos = 0;
@@ -211,6 +211,7 @@ int main() {
dac_nreset.on();
I2C1.write_reg(0x4a, 0x02, 0x9e);
+ I2C1.write_reg(0x4a, 0x06, (0 << 7) | (1 << 6) | (0 << 4) | (1 << 2) | (3 << 0));
// Initialize USB.
usb_vbus.set_mode(Pin::Input);