Potentiometer AD5204,AD5206 library.

Dependents:   MjAD520x_Hello

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MjAD520x.h Source File

MjAD520x.h

00001 #ifndef MJ_AD520X_H
00002 #define MJ_AD520X_H
00003 
00004 #include "mbed.h"
00005 
00006 class MjAD520x
00007 {
00008 public:
00009     MjAD520x(PinName mosi, PinName miso, PinName sclk, PinName cs_n, int terminalResistance);
00010     void write(int channel, int resistance);
00011     void write_u8(int channel, uint8_t value);
00012 
00013 private:
00014     SPI HwSpi;
00015     DigitalOut HwCs_n;
00016     int TerminalResistance;
00017 
00018 };
00019 
00020 #endif  // MJ_AD520X_H