aboutsummaryrefslogtreecommitdiffstats
path: root/gui/stmdsp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/stmdsp.cpp')
-rw-r--r--gui/stmdsp.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/gui/stmdsp.cpp b/gui/stmdsp.cpp
index 2091d48..0621ba1 100644
--- a/gui/stmdsp.cpp
+++ b/gui/stmdsp.cpp
@@ -62,6 +62,20 @@ namespace stmdsp
}
}
+ unsigned int device::get_sample_rate() {
+ unsigned char result = 0xFF;
+
+ if (connected()) {
+ uint8_t request[2] = {
+ 'r', 0xFF
+ };
+ m_serial.write(request, 2);
+ m_serial.read(&result, 1);
+ }
+
+ return result;
+ }
+
void device::continuous_start() {
if (connected())
m_serial.write("R");