From caadcf9ee77a20b92fdf4254dde542a981d17118 Mon Sep 17 00:00:00 2001 From: Wren Turkal Date: Thu, 8 Jan 2026 22:54:34 -0800 Subject: [PATCH] Fix cluster info size calculation. --- CHANGELOG.md | 2 ++ src/generate/peripheral.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5040881..d51fbc5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] +- Fix the cluster info size calculation. + ## [v0.37.1] - 2025-10-17 - Change `feature(doc_auto_cfg)` to `feature(doc_cfg)` to allow nightly docs to build. diff --git a/src/generate/peripheral.rs b/src/generate/peripheral.rs index 618952eb..ee04c8cf 100644 --- a/src/generate/peripheral.rs +++ b/src/generate/peripheral.rs @@ -913,7 +913,7 @@ fn cluster_info_size_in_bits(info: &ClusterInfo, path: &BlockPath, config: &Conf .map(|rbf| rbf.size) .sum(); - (reg.address_offset * BITS_PER_BYTE) + reg_size + reg_size } RegisterCluster::Cluster(clust) => { (clust.address_offset * BITS_PER_BYTE) + cluster_size_in_bits(clust, path, config)?