diff options
Diffstat (limited to 'source/main.cpp')
-rw-r--r-- | source/main.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/main.cpp b/source/main.cpp index 7a55b6c..67a39a3 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -253,14 +253,15 @@ void main_loop() } break; - //case 'r': - // if (usbserial::read(&cmd[1], 1) == 1) { + case 'r': + if (usbserial::read(&cmd[1], 1) == 1) { + adc::set_rate(static_cast<adc::rate>(cmd[1])); // adc_preloaded = cmd[1] & (1 << 0); // dac_preloaded = cmd[1] & (1 << 1); - // } else { - // error_queue_add(Error::BadParamSize); - // } - // break; + } else { + error_queue_add(Error::BadParamSize); + } + break; // 'S' - Stops the continuous sampling/conversion. case 'S': |