Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
DigitalPotentiometer.h
00001 #ifndef DigitalPotentiometer_h 00002 #define DigitalPotentiometer_h 00003 00004 #include "mbed.h" 00005 00006 #define MOSI 11 00007 #define MISO 12 00008 #define SCK 13 00009 00010 #define DigitalPotentiometer_MIN 0 00011 #define DigitalPotentiometer_MAX 256 00012 00013 class DigitalPotentiometer 00014 { 00015 public: 00016 DigitalPotentiometer(PinName csPin); 00017 int initTCON(); 00018 int readTCON(); 00019 int readStatus(); 00020 int increment(); 00021 int decrement(); 00022 int setTap(int value); 00023 00024 private: 00025 SPI _spi; 00026 DigitalOut _cs; 00027 void enable(); 00028 void disable(); 00029 }; 00030 00031 #endif
Generated on Sat Jul 16 2022 08:55:26 by
1.7.2