stm32-async-1wire 3.2.0
Non-blocking 1-Wire master for STM32 with DS18B20 temperature and DS2431 EEPROM drivers
Loading...
Searching...
No Matches
1-Wire Protocol Constants

Macros

#define ONEWIRE_ROM_BYTES   8
 Bytes in a device ROM address.
#define ONEWIRE_ROM_BITS   (ONEWIRE_ROM_BYTES * 8)
 Bits in a device ROM address.
#define ONEWIRE_BITS_PER_BYTE   8
 Bits per byte.
#define ONEWIRE_MAX_SLOTS   256u
 Maximum bit slots per hardware operation (TIM1 RCR is 8-bit: RCR = slots - 1).
#define ONEWIRE_MAX_READ_BYTES   (ONEWIRE_MAX_SLOTS / ONEWIRE_BITS_PER_BYTE)
 Maximum bytes per onewire_read_data() pass (256 slots / 8 bits).
#define ONEWIRE_RELEASE_PULSE   0u
 Value that releases the bus (idle HIGH) at the end of a multi-slot write or merged write+read operation.
#define ONEWIRE_SEARCH_ROM   0xF0
 1-Wire ROM command: Search ROM (all devices respond with their ROM)
#define ONEWIRE_ALARM_SEARCH   0xEC
 1-Wire ROM command: Alarm Search (only alarming devices respond)
#define ONEWIRE_MATCH_ROM   0x55
 1-Wire ROM command: Match ROM (address one device by its 8-byte ROM)
#define ONEWIRE_SKIP_ROM   0xCC
 1-Wire ROM command: Skip ROM (broadcast to every device on the bus)

Detailed Description

Macro Definition Documentation

◆ ONEWIRE_ALARM_SEARCH

#define ONEWIRE_ALARM_SEARCH   0xEC

1-Wire ROM command: Alarm Search (only alarming devices respond)

◆ ONEWIRE_BITS_PER_BYTE

#define ONEWIRE_BITS_PER_BYTE   8

Bits per byte.

◆ ONEWIRE_MATCH_ROM

#define ONEWIRE_MATCH_ROM   0x55

1-Wire ROM command: Match ROM (address one device by its 8-byte ROM)

◆ ONEWIRE_MAX_READ_BYTES

#define ONEWIRE_MAX_READ_BYTES   (ONEWIRE_MAX_SLOTS / ONEWIRE_BITS_PER_BYTE)

Maximum bytes per onewire_read_data() pass (256 slots / 8 bits).

◆ ONEWIRE_MAX_SLOTS

#define ONEWIRE_MAX_SLOTS   256u

Maximum bit slots per hardware operation (TIM1 RCR is 8-bit: RCR = slots - 1).

◆ ONEWIRE_RELEASE_PULSE

#define ONEWIRE_RELEASE_PULSE   0u

Value that releases the bus (idle HIGH) at the end of a multi-slot write or merged write+read operation.

Note
Pulse buffers for multi-slot writes must hold slots + 1 entries: entries [0 .. slots-1] encode the transmitted slots and the entry at index slots must equal this value. The CCR3-feed DMA loads it during the final slot, so the one-pulse timer stops with the line already released to idle HIGH (hardware bus release — no software CCR3 write afterwards). It is not an additional 1-Wire slot. For a single-slot write (slots == 1) the backend uses a separate path without DMA and does not read entry slots.

◆ ONEWIRE_ROM_BITS

#define ONEWIRE_ROM_BITS   (ONEWIRE_ROM_BYTES * 8)

Bits in a device ROM address.

◆ ONEWIRE_ROM_BYTES

#define ONEWIRE_ROM_BYTES   8

Bytes in a device ROM address.

◆ ONEWIRE_SEARCH_ROM

#define ONEWIRE_SEARCH_ROM   0xF0

1-Wire ROM command: Search ROM (all devices respond with their ROM)

◆ ONEWIRE_SKIP_ROM

#define ONEWIRE_SKIP_ROM   0xCC

1-Wire ROM command: Skip ROM (broadcast to every device on the bus)