|
stm32-async-1wire 3.2.0
Non-blocking 1-Wire master for STM32 with DS18B20 temperature and DS2431 EEPROM drivers
|
Board facts: the family selection token and ow_pulse_t. More...
Functions | |
| void | onewire_init (void) |
| Initialize the shared 1-Wire timer/DMA/GPIO resources. | |
| uint32_t | onewire_config_token (void) |
| Configuration token the library was compiled with. | |
| uint8_t | onewire_clock_ok (uint32_t sysclk_mhz) |
| Whether the runtime core clock agrees with the build. | |
Board facts: the family selection token and ow_pulse_t.
The token resolves from the CMSIS 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). Concrete device spellings are accepted for the parts this project supports (STM32F030x6 for F0; STM32F103xB for F1; STM32F303xC for F3; STM32F407xx / STM32F401xC / STM32F446xx for F4; STM32G031xx for G0; STM32G474xx for G4; STM32L476xx for L4; STM32C552xx for C5; STM32H503xx for H5; STM32U585xx for U5; STM32H743xx for H7). The token is the single point of family selection: app.c takes the device header and clock configuration from it, and the per-family facts ow_pulse_t and the OW_HSE_MHZ / OW_*_MAX_SYSCLK_MHZ defaults live in inc/ow_board.h beside it. The TIM1+DMA engine and the register-level per-family facts are library-internal and are not needed to use this API. To add a family, extend the dispatch in inc/ow_board.h (plus the #error spelling list), the app.c clock/UART config, a chips/<part>.mk part file, the Makefile (OW_KNOWN_TARGETS, the OW_TARGET family block, the OW_MCU mapping entries, TEST_CLOCK_FLAG) and CMakeLists.txt (the OW_MCU mapping, the OW_TARGET branch, the default chip) wiring, the tests/mock device header, and a case in tests/test/test_sysclk_fallback.c.
| uint8_t onewire_clock_ok | ( | uint32_t | sysclk_mhz | ) |
Whether the runtime core clock agrees with the build.
| [in] | sysclk_mhz | Core clock in whole MHz as the firmware actually runs, e.g. (SystemCoreClock / 1000000u) |
| uint32_t onewire_config_token | ( | void | ) |
Configuration token the library was compiled with.
| void onewire_init | ( | void | ) |
Initialize the shared 1-Wire timer/DMA/GPIO resources.