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.
TPA81.cpp
00001 #include "mbed.h" 00002 #include "TPA81.h" 00003 00004 00005 00006 TPA81::TPA81(PinName mysda, PinName myscl): _TPA(mysda,myscl) { 00007 _delay = 51; 00008 _addr = 0xD0; 00009 } 00010 00011 void TPA81::setAddress(char inAddr) { 00012 00013 } 00014 00015 int TPA81::getTempAt() { 00016 _cmd[0] = 1; 00017 _cmd[1] = 1; 00018 00019 _TPA.write(_addr, _cmd, 2); 00020 _TPA.read(_addr, _cmd, 1); 00021 00022 return _cmd[0]; 00023 } 00024 00025 int TPA81::getTemp(short i) { 00026 _cmd[0] = i; 00027 _cmd[1] = i; 00028 00029 _TPA.write(_addr, _cmd, 2); 00030 _TPA.read(_addr, _cmd, 1); 00031 00032 return _cmd[0]; 00033 }
Generated on Mon Jul 25 2022 11:21:59 by
1.7.2