i broke the PMOD connectors by driving them 5V lol
This commit is contained in:
parent
f3c29d57d4
commit
50a3989e98
|
@ -6,18 +6,15 @@
|
||||||
void
|
void
|
||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
uint32_t out_pins = 0;
|
uint32_t v = 0;
|
||||||
uint32_t in_pin;
|
uint32_t r = 0;
|
||||||
|
|
||||||
LOG_PRINTK("hello, world\n");
|
LOG_PRINTK("hello, world\n");
|
||||||
for (;;) {
|
for (;;) {
|
||||||
k_sleep(K_MSEC(1000));
|
k_sleep(K_MSEC(1000));
|
||||||
*dac_ctrl[0] = out_pins;
|
*adc_conv[0] = v;
|
||||||
out_pins++;
|
v = !v;
|
||||||
if (out_pins == 7)
|
r = *adc_sdo[0];
|
||||||
out_pins = 0;
|
|
||||||
in_pin = *dac_miso[0];
|
|
||||||
|
|
||||||
LOG_PRINTK("out: %d; in: %d\n", out_pins, in_pin);
|
LOG_PRINTK("out: %d; in: %d\n", v, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue