testing PMOD DAC output successful

This commit is contained in:
Peter McGoron 2022-07-13 14:12:06 -04:00
parent 2e42fef4ef
commit 60d9b63163
1 changed files with 7 additions and 1 deletions

View File

@ -11,10 +11,16 @@ main(void)
LOG_PRINTK("hello, world\n");
for (;;) {
k_sleep(K_MSEC(1000));
#if 0 // ADC code
*adc_conv[0] = v;
v = !v;
r = *adc_sdo[0];
#endif
*dac_ctrl[0] = v;
v++;
if (v == 8)
v = 0;
r = *dac_miso[0];
LOG_PRINTK("out: %d; in: %d\n", v, r);
}
}