![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Control Code with I/O and ADC working
Diff: LTC2487/LTC2487.h
- Revision:
- 0:a28a1035c31b
- Child:
- 16:82d941b1ef21
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LTC2487/LTC2487.h Mon Jan 22 20:11:52 2018 +0000 @@ -0,0 +1,43 @@ +#include "mbed.h" + +class LTC2487 { +public: + + /** Constructor + * + * @param sda I2C sda pin + * @param scl I2C scl pin + * @param address The hardware address of the LTC2487. This is the 3-bit + * value that is physically set via A0, A1, and A2. + * @param freq The I2C frequency. + */ + + LTC2487(PinName sda, PinName scl, uint8_t address, int freq); + + + /** Write to the output pins. + * + * This function is used to set output pins on or off. + * + * @param chnl The GPIO pin to set + * @param values A bitmask indicating whether a pin should be on or off. + */ + + float readOutput(int address); + + /** Sets I2C address + * + * This function is used to set the I2C address + * + * @param address The I2C address + */ + + void setAddress(int address); + + +private: + I2C i2c; + uint8_t addrI2C; + +}; +