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.
TMP06.h
00001 /* Copyright (C) 2020 Arrow Electronics */ 00002 00003 #ifndef _TMP06_H_ 00004 #define _TMP06_H_ 00005 00006 #include "mbed.h" 00007 00008 #define SUCCESS 0 00009 #define FAILURE 1 00010 #define SEM_TIMEOUT_MS 250 00011 00012 class TMP06 { 00013 public: 00014 TMP06(PinName pin); 00015 ~TMP06(); 00016 int read(float *temperature); 00017 00018 private: 00019 void on_rise(); 00020 void on_fall(); 00021 00022 InterruptIn _pwm_pin; 00023 Timer _timer1; 00024 Timer _timer2; 00025 Semaphore _semaphore; 00026 bool _first_run; 00027 bool _started; 00028 }; 00029 00030 #endif /* _TMP06_H_ */
Generated on Wed Jul 13 2022 09:54:02 by
1.7.2