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

Public board-level facts for the non-blocking 1-Wire layer. More...

#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef uint8_t ow_pulse_t
 DMA feed entry width of the active family.

Detailed Description

Public board-level facts for the non-blocking 1-Wire layer.

The small part of the port that the public API and the application layer legitimately need, with no CMSIS device header and no register vocabulary:

  • the family selection token (OW_FAMILY_*), resolved from the STMicroelectronics device macro of the target (e.g. -DSTM32F030x6) or, for host-test mocks, PlatformIO and STM32CubeMX projects, from a family macro (STM32F0, STM32F1, STM32F3, STM32F4, STM32G0, STM32G4, STM32L4, STM32C5, STM32H5, STM32U5, STM32H7);
  • ow_pulse_t, the DMA feed entry the public write API hands to the hardware: 8-bit on F0/F1/F3/G0/G4/L4/C5/H5/U5, 16-bit on F4/H7 (direct-mode feed);
  • the board clock defaults read by the application layer (OW_HSE_MHZ and the OW_*_MAX_SYSCLK_MHZ part ceilings).

The CMSIS device header, the per-family register/DMA facts and the TIM1+DMA engine are private to the library and are never reached from the public headers.

Include order: onewire.h includes this header for ow_pulse_t, and the engine's family header includes it for the dispatch, so the token is defined exactly once and nothing depends on which is included first. It is the single point of family selection.

Typedef Documentation

◆ ow_pulse_t

typedef uint8_t ow_pulse_t

DMA feed entry width of the active family.

The public write API (onewire_write_slots/us, onewire_encode_byte) takes a buffer of these and the hardware feeds CCR3 from it without a copy. F4 and H7 feed in DMA direct mode, where the memory-transfer width is forced to the peripheral size, so an entry is a 16-bit halfword there; every other family latches 8-bit entries. Keeping it family-sized avoids doubling the pulse buffers on 4 KB-RAM parts.