libDaisy
Hardware Library for Daisy
parameter.h
Go to the documentation of this file.
1#pragma once
2#include <stdint.h>
3#include "hid/ctrl.h"
4
5namespace daisy
6{
13{
14 public:
16 enum Curve
17 {
23 };
28
35 void Init(AnalogControl input, float min, float max, Curve curve);
36
40 float Process();
41
48 inline float Value() { return val_; }
49
50 private:
51 AnalogControl in_;
52 float pmin_, pmax_;
53 float lmin_, lmax_; // for log range
54 float val_;
55 Curve pcurve_;
56};
58} // namespace daisy
Hardware Interface for control inputs Primarily designed for ADC input controls such as potentiom...
Definition: ctrl.h:18
Definition: parameter.h:13
float Value()
Definition: parameter.h:48
void Init(AnalogControl input, float min, float max, Curve curve)
Curve
Definition: parameter.h:17
@ LINEAR
Definition: parameter.h:18
@ LOGARITHMIC
Definition: parameter.h:20
@ EXPONENTIAL
Definition: parameter.h:19
@ CUBE
Definition: parameter.h:21
@ LAST
Definition: parameter.h:22
Parameter()
Definition: parameter.h:25
~Parameter()
Definition: parameter.h:27
Hardware defines and helpers for daisy field platform.
Definition: index.h:2