109 * |
109 * |
110 * NOTE: if additional devices are added to the bus, operation will cease to work correctly. |
110 * NOTE: if additional devices are added to the bus, operation will cease to work correctly. |
111 * |
111 * |
112 * @param[in] ds18b20_info Pointer to device info instance. |
112 * @param[in] ds18b20_info Pointer to device info instance. |
113 * @param[in] bus Pointer to initialised 1-Wire bus instance. |
113 * @param[in] bus Pointer to initialised 1-Wire bus instance. |
114 * @param[in] rom_code Device-specific ROM code to identify a device on the bus. |
|
115 */ |
114 */ |
116 void ds18b20_init_solo(DS18B20_Info * ds18b20_info, const OneWireBus * bus); |
115 void ds18b20_init_solo(DS18B20_Info * ds18b20_info, const OneWireBus * bus); |
117 |
116 |
118 /** |
117 /** |
119 * @brief Enable or disable use of CRC checks on device communications. |
118 * @brief Enable or disable use of CRC checks on device communications. |
149 OneWireBus_ROMCode ds18b20_read_rom(DS18B20_Info * ds18b20_info); |
148 OneWireBus_ROMCode ds18b20_read_rom(DS18B20_Info * ds18b20_info); |
150 |
149 |
151 /** |
150 /** |
152 * @brief Start a temperature measurement conversion on a single device. |
151 * @brief Start a temperature measurement conversion on a single device. |
153 * @param[in] ds18b20_info Pointer to device info instance. |
152 * @param[in] ds18b20_info Pointer to device info instance. |
|
153 * @return True if successfull. |
154 */ |
154 */ |
155 bool ds18b20_convert(const DS18B20_Info * ds18b20_info); |
155 bool ds18b20_convert(const DS18B20_Info * ds18b20_info); |
156 |
156 |
157 /** |
157 /** |
158 * @brief Start temperature conversion on all connected devices. |
158 * @brief Start temperature conversion on all connected devices. |
163 */ |
163 */ |
164 void ds18b20_convert_all(const OneWireBus * bus); |
164 void ds18b20_convert_all(const OneWireBus * bus); |
165 |
165 |
166 /** |
166 /** |
167 * @brief Wait for the maximum conversion time according to the current resolution of the device. |
167 * @brief Wait for the maximum conversion time according to the current resolution of the device. |
168 * @param[in] bus Pointer to initialised bus instance. |
168 * @param[in] ds18b20_info Pointer to device info instance. Must be initialised first. |
169 * @return An estimate of the time elapsed, in milliseconds. Actual elapsed time may be greater. |
169 * @return An estimate of the time elapsed, in milliseconds. Actual elapsed time may be greater. |
170 */ |
170 */ |
171 float ds18b20_wait_for_conversion(const DS18B20_Info * ds18b20_info); |
171 float ds18b20_wait_for_conversion(const DS18B20_Info * ds18b20_info); |
172 |
172 |
173 /** |
173 /** |