![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Control Code with I/O and ADC working
LTC2487/LTC2487.h
- Committer:
- jrodenburg
- Date:
- 2018-01-22
- Revision:
- 0:a28a1035c31b
- Child:
- 16:82d941b1ef21
File content as of revision 0:a28a1035c31b:
#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; };