|
stm32-async-1wire 3.2.0
Non-blocking 1-Wire master for STM32 with DS18B20 temperature and DS2431 EEPROM drivers
|
Functions | |
| void | ds2431_init (void) |
| Initialize DS2431 driver hardware and peripherals. | |
| void | ds2431_select (const uint8_t *rom) |
| Select which DS2431 device to address by its ROM address. | |
| void | ds2431_set_parasite (uint8_t parasite) |
| Declare the bus as parasite-powered. | |
| uint8_t | ds2431_parasite_mode (void) |
| Current parasite-power configuration of the driver. | |
| uint8_t | ds2431_last_command_ok (void) |
| Result of the last completed DS2431 operation. | |
| void | ds2431_read_memory (uint8_t *dst, uint16_t addr, uint8_t len) |
| Read up to DS2431_READ_PASS bytes of EEPROM (non-blocking). | |
| uint8_t | ds2431_read_memory_poll (void) |
| Advance the non-blocking Read Memory operation. | |
| uint8_t | ds2431_write_scratchpad (uint16_t addr, const uint8_t *data, uint8_t len) |
| Write up to 8 bytes into the scratchpad (non-blocking). | |
| uint8_t | ds2431_write_scratchpad_poll (void) |
| Advance the non-blocking Write Scratchpad operation. | |
| void | ds2431_read_scratchpad (uint8_t *buf) |
| Read the scratchpad frame (non-blocking). | |
| uint8_t | ds2431_read_scratchpad_poll (void) |
| Advance the non-blocking scratchpad frame read. | |
| void | ds2431_copy_scratchpad (void) |
| Copy the scratchpad into the EEPROM (non-blocking). | |
| uint8_t | ds2431_copy_scratchpad_poll (void) |
| Advance the non-blocking Copy Scratchpad operation. | |
| void ds2431_copy_scratchpad | ( | void | ) |
Copy the scratchpad into the EEPROM (non-blocking).
| uint8_t ds2431_copy_scratchpad_poll | ( | void | ) |
Advance the non-blocking Copy Scratchpad operation.
| void ds2431_init | ( | void | ) |
Initialize DS2431 driver hardware and peripherals.
| uint8_t ds2431_last_command_ok | ( | void | ) |
Result of the last completed DS2431 operation.
| uint8_t ds2431_parasite_mode | ( | void | ) |
Current parasite-power configuration of the driver.
| void ds2431_read_memory | ( | uint8_t * | dst, |
| uint16_t | addr, | ||
| uint8_t | len ) |
Read up to DS2431_READ_PASS bytes of EEPROM (non-blocking).
| [in,out] | dst | Buffer for the read data; written on success |
| [in] | addr | Start address in EEPROM (0 .. DS2431_EEPROM_SIZE - 1) |
| [in] | len | Bytes to read, 1 .. DS2431_READ_PASS; addr + len must not exceed DS2431_EEPROM_SIZE |
| uint8_t ds2431_read_memory_poll | ( | void | ) |
Advance the non-blocking Read Memory operation.
| void ds2431_read_scratchpad | ( | uint8_t * | buf | ) |
Read the scratchpad frame (non-blocking).
| [in,out] | buf | Buffer for TA1, TA2, ES and the scratchpad bytes; written on success. The caller reads the real data length from the E/S byte (buf[2] & 0x07); bytes beyond the reply window are zeroed, so the buffer is always DS2431_SCRATCH_FRAME long. |
| uint8_t ds2431_read_scratchpad_poll | ( | void | ) |
Advance the non-blocking scratchpad frame read.
| void ds2431_select | ( | const uint8_t * | rom | ) |
Select which DS2431 device to address 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 ds2431_set_parasite | ( | uint8_t | parasite | ) |
Declare the bus as parasite-powered.
| [in] | parasite | 1 = devices are powered over the data line, 0 = external VDD supply (default) |
| uint8_t ds2431_write_scratchpad | ( | uint16_t | addr, |
| const uint8_t * | data, | ||
| uint8_t | len ) |
Write up to 8 bytes into the scratchpad (non-blocking).
| [in] | addr | Block-aligned target address in EEPROM |
| [in] | data | Data to write to the scratchpad |
| [in] | len | Bytes to write, 1 .. DS2431_SCRATCH_SIZE; addr + len must not exceed DS2431_EEPROM_SIZE |
| uint8_t ds2431_write_scratchpad_poll | ( | void | ) |
Advance the non-blocking Write Scratchpad operation.