-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If the last command issued on the 1-Wire is a "convert temperature", then reads can be done until the value returned is 1, which means that the conversion is finished. The conversion times in the manuals are maximum values, actual conversion times are much faster and the only reason to delay the maximum times are when one or more devices are parasitically powered.
- Loading branch information
Arnd
authored
Dec 3, 2016
1 parent
8e68828
commit 0b69c9b
Showing
2 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,7 @@ | |
** ** | ||
** Vers. Date Developer Comments ** | ||
** ====== ========== =================== ======================================================================== ** | ||
** 1.0.2 2016-12-03 [email protected] Added optional ReadDeviceTemp "WaitSwitch", minimized conversion delays ** | ||
** 1.0.1 2016-12-02 [email protected] Added delays for ReadDeviceTemp() and when a parasitic device is present ** | ||
** 1.0.0 2016-12-01 [email protected] Initial release ** | ||
** 1.0.b5 2016-11-30 [email protected] Moved 1-Wire calls to private, refactored some of the calls ** | ||
|
@@ -136,7 +137,8 @@ | |
uint8_t ScanForDevices (); // Scan/rescan the 1-Wire microLAN // | ||
int16_t ReadDeviceTemp (const uint8_t deviceNumber, // Return the temperature // | ||
const bool raw=false); // optionally using the raw value // | ||
void DeviceStartConvert (const uint8_t deviceNumber=UINT8_MAX); // Start conversion on device // | ||
void DeviceStartConvert (const uint8_t deviceNumber=UINT8_MAX, // Start conversion on device // | ||
const bool WaitSwitch=false); // optionally wait for it to finish // | ||
void Calibrate (const uint8_t iterations=30); // Calibrate to read identically // | ||
int8_t GetDeviceCalibration(const uint8_t deviceNumber); // Get the device's calibration // | ||
void SetDeviceCalibration(const uint8_t deviceNumber, // Set calibration bytes 1 & 2 // | ||
|
@@ -156,6 +158,7 @@ | |
void ParasiticWait(); // Wait for conversion if parasitic // | ||
uint8_t _MaxThermometers; // Devices fit (EEPROM-ReserveRom) // | ||
uint32_t _ConvStartTime; // Conversion start time // | ||
bool _LastCommandWasConvert=false; // Unset when other commands issued // | ||
IO_REG_TYPE bitmask; // // | ||
volatile IO_REG_TYPE *baseReg; // // | ||
unsigned char ROM_NO[8]; // global search state // | ||
|