lib to set the address of the MCP4728
Dependents: MCP4728setaddrProg mbedSerialInterface_talkback2 MCP4728test mbedSerialInterface_sequencer
MCP4728setaddr.h
- Committer:
- wbeaumont
- Date:
- 2016-12-14
- Revision:
- 1:1ba04e54bd3c
- Parent:
- 0:19560a1deb3c
- Child:
- 2:6ebeef601a90
File content as of revision 1:1ba04e54bd3c:
class I2CInterface; //class DigitalOut; //class InterruptIn; class MPC4728_address_set{ I2CInterface *i2cd; DigitalOut *LDAC; DigitalOut *Cntout; InterruptIn cntin; int sclcnt; unsigned char oldaddress; void count_down( ); int ldac1; int ldac0; public: MPC4728_address_set(PinName sclcntpin, DigitalOut *LDACpin, I2CInterface* i2cdevice, DigitalOut *Cntoutpin , bool ldac_invert=false ); int getsclcnt( ){return sclcnt;} int readaddress(char& address, char& eepromaddr , char& regaddr ); int setaddress(char currentaddress, char newaddress ); void start_scl_cnt(int cnts) ; };//endclass