2022-07-13 12:07:03 -04:00
|
|
|
#include <zephyr/zephyr.h>
|
|
|
|
#include <zephyr/kernel.h>
|
|
|
|
#include <zephyr/logging/log.h>
|
|
|
|
#include "pin_io.h"
|
|
|
|
|
|
|
|
void
|
|
|
|
main(void)
|
|
|
|
{
|
2022-07-13 12:30:36 -04:00
|
|
|
uint32_t v = 0;
|
|
|
|
uint32_t r = 0;
|
2022-07-13 12:07:03 -04:00
|
|
|
LOG_PRINTK("hello, world\n");
|
|
|
|
for (;;) {
|
|
|
|
k_sleep(K_MSEC(1000));
|
2022-07-13 12:30:36 -04:00
|
|
|
*adc_conv[0] = v;
|
|
|
|
v = !v;
|
|
|
|
r = *adc_sdo[0];
|
2022-07-13 12:07:03 -04:00
|
|
|
|
2022-07-13 12:30:36 -04:00
|
|
|
LOG_PRINTK("out: %d; in: %d\n", v, r);
|
2022-07-13 12:07:03 -04:00
|
|
|
}
|
|
|
|
}
|