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.
Fork of TCTF_Control_Main by
LTC2487.h
00001 #include "mbed.h" 00002 00003 class LTC2487 { 00004 public: 00005 00006 /** Constructor 00007 * 00008 * @param sda I2C sda pin 00009 * @param scl I2C scl pin 00010 * @param address The hardware address of the LTC2487. This is the 3-bit 00011 * value that is physically set via A0, A1, and A2. 00012 * @param freq The I2C frequency. 00013 */ 00014 00015 LTC2487(PinName sda, PinName scl, uint8_t address, int freq); 00016 00017 00018 /** Write to LTC chip to select port to read from 00019 * 00020 * This function is used select the LTC2487 channel we would like to read from 00021 * 00022 * @param channel The channel we would like to read from 00023 */ 00024 00025 float writePort(int channel); 00026 00027 /** Read value from LTC2487 00028 * 00029 * This function is used to read data from LTC2487 from channel selected in writePort() 00030 * 00031 * @param N/A 00032 */ 00033 00034 float read(); 00035 00036 /** Sets I2C address 00037 * 00038 * This function is used to set the I2C address 00039 * 00040 * @param address The I2C address 00041 */ 00042 00043 void setAddress(int address); 00044 00045 00046 private: 00047 I2C i2c; 00048 uint8_t addrI2C; 00049 00050 }; 00051
Generated on Fri Jul 15 2022 01:55:39 by
1.7.2
