77#define DS2431_FAMILY_CODE 0x2D
82#define DS2431_BITS_PER_BYTE 8
87#define DS2431_ROM_BYTES 8
92#define DS2431_EEPROM_SIZE 128
97#define DS2431_PAGE_SIZE 32
102#define DS2431_PAGE_COUNT (DS2431_EEPROM_SIZE / DS2431_PAGE_SIZE)
109#define DS2431_SCRATCH_SIZE 8
119#define DS2431_SCRATCH_FRAME (DS2431_SCRATCH_SIZE + 3)
130#define DS2431_SCRATCH_FRAME_CRC (DS2431_SCRATCH_FRAME + 2)
138#define DS2431_READ_MEMORY 0xF0
146#define DS2431_WRITE_SCRATCHPAD 0x0F
161#define DS2431_READ_SCRATCHPAD 0xAA
176#define DS2431_COPY_SCRATCHPAD 0x55
182#define DS2431_MATCH_ROM 0x55
187#define DS2431_SKIP_ROM 0xCC
194#define DS2431_TPROG_US 11000
202#define DS2431_READ_PASS 8
void ds2431_init(void)
Initialize DS2431 driver hardware and peripherals.
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_parasite_mode(void)
Current parasite-power configuration of the driver.
uint8_t ds2431_read_memory_poll(void)
Advance the non-blocking Read Memory operation.
uint8_t ds2431_copy_scratchpad_poll(void)
Advance the non-blocking Copy Scratchpad operation.
uint8_t ds2431_read_scratchpad_poll(void)
Advance the non-blocking scratchpad frame read.
void ds2431_set_parasite(uint8_t parasite)
Declare the bus as parasite-powered.
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_write_scratchpad_poll(void)
Advance the non-blocking Write Scratchpad operation.
uint8_t ds2431_last_command_ok(void)
Result of the last completed DS2431 operation.
void ds2431_select(const uint8_t *rom)
Select which DS2431 device to address by its ROM address.
void ds2431_copy_scratchpad(void)
Copy the scratchpad into the EEPROM (non-blocking).
void ds2431_read_scratchpad(uint8_t *buf)
Read the scratchpad frame (non-blocking).
Central compile-time configuration for the 1-Wire stack.
Library version (semantic versioning).