Fork of Smoothie to port to mbed non-LPC targets.

Dependencies:   mbed

Fork of Smoothie by Stéphane Cachat

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DigipotBase.h Source File

DigipotBase.h

00001 #ifndef DIGIPOTBASE_H
00002 #define DIGIPOTBASE_H
00003 
00004 #include "libs/Kernel.h"
00005 #include "libs/utils.h"
00006 #include <string>
00007 #include <math.h>
00008 
00009 class DigipotBase {
00010     public:
00011         DigipotBase(){}
00012         virtual ~DigipotBase(){}
00013 
00014         virtual void set_current( int channel, float current )= 0;
00015         virtual float get_current(int channel)= 0;
00016         void set_max_current(float c) { max_current= c; }
00017         void set_factor(float f) { factor= f; }
00018 
00019     protected:
00020         float factor;
00021         float max_current;
00022 };
00023 
00024 
00025 #endif