testing PMOD DAC output successful
This commit is contained in:
parent
2e42fef4ef
commit
60d9b63163
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue