Library for AD5206 digital potentiometer from Analog Devices
Dependents: AD5206_demo USB_speaker 4180_proj_approach_2 4180_proj ... more
Diff: AD5206.cpp
- Revision:
- 0:d2adf1f7e548
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AD5206.cpp Sat Oct 17 20:02:13 2015 +0000 @@ -0,0 +1,12 @@ +#include <AD5206.h> + +AD5206::AD5206(PinName mosi, PinName miso, PinName sclk, PinName cs): _spi(mosi, miso, sclk), _cs(cs) { + _cs = 1; +} + +void AD5206::write_AD5206(int addr,int val){ + _cs=0; + _spi.write(addr); + _spi.write(val); + _cs=1; +} \ No newline at end of file