diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2020-11-08 18:31:02 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2020-11-08 18:31:02 -0500 |
commit | e12639c46f0be29461803ffa1790d6f69c16d280 (patch) | |
tree | 5195f6ce497d702cef57bd752a9ec5c054855a87 /source/adc.hpp | |
parent | f3e4d176d5922a13ce2615895cea1e197175984a (diff) |
fixed sample rate setting
Diffstat (limited to 'source/adc.hpp')
-rw-r--r-- | source/adc.hpp | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/source/adc.hpp b/source/adc.hpp index 5f41117..1431aa1 100644 --- a/source/adc.hpp +++ b/source/adc.hpp @@ -19,33 +19,18 @@ namespace adc using operation_t = void (*)(adcsample_t *buffer, size_t count); enum class rate : unsigned int { - R3125 = 0, - R3750, - R6250, - R7500, - R12K5, - R15K, - R25K, - R30K, - R40K, - R50K, - R60K, - R80K, + R16K = 0, + R48K, R96K, R100K, - R120K, - R160K, - R200K, - R240K, R400K, - R480K, - R800K, - R960K, - R1M6 + R1M, + R2M }; void init(); void set_rate(rate new_rate); + unsigned int get_rate(); unsigned int get_gpt_divisor(); adcsample_t *read(adcsample_t *buffer, size_t count); void read_start(operation_t operation_func, adcsample_t *buffer, size_t count); |