aboutsummaryrefslogtreecommitdiffstats
path: root/source/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/main.cpp')
-rw-r--r--source/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/main.cpp b/source/main.cpp
index b5ebf86..f1170a6 100644
--- a/source/main.cpp
+++ b/source/main.cpp
@@ -26,6 +26,8 @@ CC_ALIGN(CACHE_LINE_SIZE)
static std::array<adcsample_t, CACHE_SIZE_ALIGN(adcsample_t, 2048)> adc_samples;
static std::array<dacsample_t, CACHE_SIZE_ALIGN(dacsample_t, 2048)> dac_samples;
+static void signal_operate(adcsample_t *buffer, size_t count);
+
int main()
{
halInit();
@@ -51,6 +53,12 @@ int main()
usbserial::write(adc_samples.data(), count * sizeof(adcsample_t));
}
break;
+ case 'R':
+ adc::read_start(signal_operate, &adc_samples[0], adc_samples.size() * sizeof(adcsample_t));
+ break;
+ case 'S':
+ adc::read_stop();
+ break;
case 'W':
if (usbserial::read(&cmd[1], 2) < 2)
break;
@@ -77,3 +85,8 @@ int main()
}
}
+void signal_operate([[maybe_unused]] adcsample_t *buffer, [[maybe_unused]] size_t count)
+{
+
+}
+