|
stm32-async-1wire 3.2.0
Non-blocking 1-Wire master for STM32 with DS18B20 temperature and DS2431 EEPROM drivers
|
Functions | |
| uint8_t | ds18b20_crc8 (const uint8_t *data, uint8_t len) |
| Calculate Dallas/Maxim CRC-8 over a byte buffer. | |
| void | ds18b20_init (void) |
| Initialize DS18B20 driver hardware and peripherals. | |
| void | ds18b20_poll (void) |
| Advance the state machine (non-blocking). | |
| void | ds18b20_start_measure (void) |
| Start one measurement cycle (non-blocking). | |
| void | ds18b20_select (const uint8_t *rom) |
| Select which DS18B20 device to measure by its ROM address. | |
| void | ds18b20_busy (unsigned action) |
| Busy indicator callback (weak). | |
| void | ds18b20_complete (int16_t temp) |
| Measurement complete callback (weak). | |
| void ds18b20_busy | ( | unsigned | action | ) |
Busy indicator callback (weak).
| [in] | action | 0 = idle, non-zero = busy |
| void ds18b20_complete | ( | int16_t | temp | ) |
Measurement complete callback (weak).
| [in] | temp | Temperature in tenths of degrees Celsius, or error code |
| uint8_t ds18b20_crc8 | ( | const uint8_t * | data, |
| uint8_t | len ) |
Calculate Dallas/Maxim CRC-8 over a byte buffer.
| [in] | data | Input buffer |
| [in] | len | Number of bytes to process |
| void ds18b20_init | ( | void | ) |
Initialize DS18B20 driver hardware and peripherals.
| void ds18b20_poll | ( | void | ) |
Advance the state machine (non-blocking).
This function implements the core non-blocking state machine that manages the 1-Wire communication protocol with the DS18B20 sensor. It uses hardware timer and DMA to handle timing-critical operations without software delays. At DS18B20_ST_IDLE it does nothing until ds18b20_start_measure() requests a cycle.
| void ds18b20_select | ( | const uint8_t * | rom | ) |
Select which DS18B20 device to measure by its ROM address.
| [in] | rom | Pointer to the 8-byte ROM address (LSB first), or NULL to return to Skip ROM (broadcast) addressing |
| void ds18b20_start_measure | ( | void | ) |
Start one measurement cycle (non-blocking).