Skip to content

Commit 3e81498

Browse files
chore(release): prepare v0.12.0 with AGPL metadata, mixed-bus docs/examples, and line-ending policy
1 parent d169cf7 commit 3e81498

13 files changed

Lines changed: 86 additions & 61 deletions

File tree

.gitattributes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Normalize text files in this repository to LF to avoid cross-platform churn.
2+
* text=auto eol=lf
3+
4+
# Windows-native scripts keep CRLF.
5+
*.bat text eol=crlf
6+
*.cmd text eol=crlf
7+
*.ps1 text eol=crlf
8+
9+
# Binary assets should never be line-normalized.
10+
*.png binary
11+
*.jpg binary
12+
*.jpeg binary
13+
*.gif binary
14+
*.pdf binary
15+
*.zip binary

CHANGELOG.md

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,56 @@ All notable changes to CRUMBS are documented in this file.
88

99
### Added
1010

11-
- **ESP32 CI build validation**`[env:esp32dev]` added to all eight example `platformio.ini`
12-
files; eight matching `esp32dev` build steps added to the `platformio` CI job. Validates that
13-
all examples compile cleanly for ESP32 (espressif32 platform, Arduino framework).
14-
- `docs/platform-setup.md` — added ESP32 `platformio.ini` snippet with I²C pin note.
11+
- **Raw I2C helper APIs** (`src/crumbs.h`, `src/core/crumbs_i2c_helpers.c`)
12+
- `crumbs_i2c_dev_write`, `crumbs_i2c_dev_read`, `crumbs_i2c_dev_write_then_read`
13+
- register helpers: `read_reg_ex` / `write_reg_ex`, plus `u8` and `u16be` wrappers
14+
- standardized `CRUMBS_I2C_DEV_E_*` return codes
15+
- **Candidate-address CRUMBS scanner**
16+
- `crumbs_controller_scan_for_crumbs_candidates(...)` for mixed-bus safe probing without broad sweeps
17+
- **HAL combined transfer support**
18+
- `crumbs_linux_write_then_read(...)`
19+
- `crumbs_arduino_write_then_read(...)`
20+
- **Mixed-bus validation examples**
21+
- Linux: `examples/core_usage/linux/mixed_bus_controller/`
22+
- Arduino: `examples/core_usage/arduino/mixed_bus_controller/`
23+
- includes CRUMBS candidate scanning + non-CRUMBS sensor register I/O flow
24+
- **Coverage for new helpers**
25+
- `tests/test_i2c_helpers.c`
26+
- **Core Arduino example consistency**
27+
- added simple `LED_BUILTIN` heartbeat across core Arduino examples
28+
- standardized `config.h` usage in core Arduino examples
29+
- **ESP32 CI build validation**
30+
- `[env:esp32dev]` coverage added across PlatformIO examples and CI workflow steps
31+
- `docs/platform-setup.md` ESP32 PlatformIO snippet with I2C pin guidance
1532

1633
### Fixed
1734

18-
- **`examples/handlers_usage/linux/mock_controller/mock_controller.c`** — updated all
19-
`mock_query_*` / `mock_send_*` call sites to the `crumbs_device_t *dev` API introduced in
20-
0.11.0; replaced deprecated `crumbs_linux_read_message` + manual parse with `mock_get_*()`
21-
combined helpers. Fixes Linux CI compile failure.
22-
23-
- **`examples/handlers_usage/platformio/mock_controller/src/main.cpp`** — same migration for
24-
the Arduino/PlatformIO mock controller: added `crumbs_device_t dev` global, rewrote
25-
`query_and_print()` to use `mock_get_*()`, updated `cmd_echo / cmd_heartbeat / cmd_toggle`
26-
to pass `&dev`. Fixes PlatformIO CI compile failure.
27-
28-
- **`LED_BUILTIN` fallback for ESP32** — added `#ifndef LED_BUILTIN / #define LED_BUILTIN 2`
29-
guards to `simple_peripheral/src/main.cpp` and `mock_peripheral/src/main.cpp`; the
30-
`espressif32` platform does not define `LED_BUILTIN` for `esp32dev`, causing a compile error
31-
on ESP32 CI builds. GPIO 2 is the standard onboard LED for ESP32 DevKit boards.
35+
- Linux mixed-bus controller parser and CLI path issues for `read-ex`/`write-ex` handling
36+
- Linux HAL portability by defining `_DEFAULT_SOURCE` for `usleep()` under `-std=c11`
37+
- handlers_usage mock controller examples updated to `crumbs_device_t` APIs and query helpers (Linux + PlatformIO), resolving CI compile failures
38+
- `LED_BUILTIN` fallback for ESP32 examples (`#ifndef LED_BUILTIN ... #define LED_BUILTIN 2`)
39+
- API reference scan behavior documentation corrections
3240

3341
### Changed
3442

35-
- Post-release docs sweep (`0649205`): corrected stale `0.10.3` version references in all
36-
eight `platformio.ini` examples, `CONTRIBUTING.md`, `docs/index.md`, and
37-
`docs/api-reference.md`; fixed hardcoded `MINOR`/`PATCH` values in `test_version.c`.
38-
- README badge layout revised; `.gitignore` extended with `*.log` pattern.
43+
- **Mixed-bus Arduino controller flow** (`examples/core_usage/arduino/mixed_bus_controller/`)
44+
- startup validation pass + periodic status pass (default 5s)
45+
- CRUMBS query reply printout for discovered devices
46+
- BMP/BME chip-id + raw sample byte printout per configured sensor
47+
- **Core docs and examples updated for mixed-bus usage**
48+
- explicit min/max topology guidance
49+
- unique address guidance for CRUMBS peripherals
50+
- candidate-address scanning pattern documented
51+
- **License posture aligned to AGPL**
52+
- repository license is GNU AGPL v3
53+
- metadata/docs references updated to AGPL-3.0-or-later
54+
- **Repository line ending policy added**
55+
- `.gitattributes` now enforces LF for text and CRLF for Windows scripts to reduce cross-platform churn
56+
- **Code quality**
57+
- read-helper bounds checks use explicit `size_t` casts in `crumbs_message_helpers.h` to avoid conversion/sign-compare warning noise
58+
- Post-0.11.0 version/docs sweep:
59+
- stale version references corrected across examples/docs
60+
- README badge/layout cleanup and `.gitignore` log pattern expansion
3961

4062
---
4163

@@ -184,18 +206,6 @@ All notable changes to CRUMBS are documented in this file.
184206

185207
---
186208

187-
## [Unreleased] - Code Quality
188-
189-
### Changed
190-
191-
- **Read helper bounds checks now use explicit `size_t` casts** (`crumbs_message_helpers.h`)
192-
- `crumbs_msg_read_u16`, `crumbs_msg_read_u32`, `crumbs_msg_read_float`, `crumbs_msg_read_bytes`
193-
- Arithmetic in bounds checks now cast to `size_t` before addition, matching the existing style of the `add_*` helpers
194-
- Eliminates potential `-Wconversion`/`-Wsign-compare` warnings (particularly the `read_float` case where `int` was previously compared against `size_t` from `sizeof`)
195-
- No functional change — semantics were already correct due to C integer promotion rules
196-
197-
---
198-
199209
## [0.10.3] - Examples Improvements
200210

201211
### Added

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.13)
22

33
project(CRUMBS
4-
VERSION 0.11.0
4+
VERSION 0.12.0
55
LANGUAGES C
66
)
77

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ CRUMBS is designed to work seamlessly with Arduino IDE and PlatformIO:
8484
```ini
8585
# platformio.ini
8686
lib_deps =
87-
cameronbrooks11/CRUMBS@^0.11.0
87+
cameronbrooks11/CRUMBS@^0.12.0
8888
```
8989

9090
Or for local development (see [Local Development](#local-development-with-platformio) below).
@@ -229,7 +229,7 @@ When developing changes to CRUMBS itself, test locally before publishing:
229229
```ini
230230
# Change from registry version
231231
lib_deps =
232-
cameronbrooks11/CRUMBS@^0.11.0
232+
cameronbrooks11/CRUMBS@^0.12.0
233233

234234
# To local symlink
235235
lib_deps =
@@ -249,7 +249,7 @@ When developing changes to CRUMBS itself, test locally before publishing:
249249

250250
```ini
251251
lib_deps =
252-
cameronbrooks11/CRUMBS@^0.11.0
252+
cameronbrooks11/CRUMBS@^0.12.0
253253
```
254254

255255
**Path explanation:**

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CRUMBS (Communications Router and Unified Message Broker System) is a small, por
1313
[![Language](https://img.shields.io/badge/language-C%20%7C%20C%2B%2B-00599C)](./)
1414
[![CMake](https://img.shields.io/badge/build-CMake-064F8C)](https://cmake.org/)
1515

16-
[![License: GPL-3.0-or-later](https://img.shields.io/badge/License-GPL--3.0--or--later-blue.svg)](./LICENSE)
16+
[![License: AGPL-3.0-or-later](https://img.shields.io/badge/License-AGPL--3.0--or--later-blue.svg)](./LICENSE)
1717
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/cameronbrooks11/library/CRUMBS.svg)](https://registry.platformio.org/libraries/cameronbrooks11/CRUMBS)
1818

1919
## Features
@@ -54,7 +54,7 @@ Upload [hello examples](examples/core_usage/arduino/hello_peripheral/) to two Ar
5454
5555
```ini
5656
[env]
57-
lib_deps = cameronbrooks11/CRUMBS@^0.11.0
57+
lib_deps = cameronbrooks11/CRUMBS@^0.12.0
5858
```
5959

6060
**Arduino IDE:** Tools → Manage Libraries → "CRUMBS" → Install, or copy to `~/Arduino/libraries/`
@@ -117,5 +117,5 @@ Details: [platform-setup.md](docs/platform-setup.md)
117117

118118
## License
119119

120-
GPL-3.0 - see [LICENSE](LICENSE) file for details.
120+
AGPL-3.0-or-later - see [LICENSE](LICENSE) file for details.
121121

docs/api-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ typedef struct crumbs_context_t {
6363
#define CRUMBS_MAX_PAYLOAD 27 // Maximum payload bytes
6464
#define CRUMBS_MESSAGE_MAX_SIZE 31 // Maximum serialized frame size
6565
#define CRUMBS_CMD_SET_REPLY 0xFE // Reserved opcode for SET_REPLY command
66-
#define CRUMBS_VERSION 1100 // Library version (1100 = v0.11.0, formula: major*10000 + minor*100 + patch)
66+
#define CRUMBS_VERSION 1100 // Library version (1100 = v0.12.0, formula: major*10000 + minor*100 + patch)
6767
```
6868
6969
### Bound-Device Handle

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Historical and technical deep-dive documents are in [archive/](archive/):
225225

226226
---
227227

228-
**Version**: 0.11.0
228+
**Version**: 0.12.0
229229
**Author**: Cameron K. Brooks
230230
**Dependencies**: Wire library (Arduino), linux-wire (Linux HAL)
231-
**License**: GPL-3.0-or-later
231+
**License**: AGPL-3.0-or-later

docs/platform-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ board = nanoatmega328new
160160
framework = arduino
161161

162162
lib_deps =
163-
cameronbrooks11/CRUMBS@^0.11.0
163+
cameronbrooks11/CRUMBS@^0.12.0
164164

165165
build_flags =
166166
-DCRUMBS_MAX_HANDLERS=8 ; optional: reduce handler table size
@@ -175,7 +175,7 @@ board = esp32dev
175175
framework = arduino
176176

177177
lib_deps =
178-
cameronbrooks11/CRUMBS@^0.11.0
178+
cameronbrooks11/CRUMBS@^0.12.0
179179

180180
build_flags =
181181
-DCRUMBS_MAX_HANDLERS=8 ; optional

examples/families_usage/controller_discovery/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ make
7272
```sh
7373
lhwit> scan
7474
Scanning for CRUMBS devices...
75-
Found Calculator at 0x10 (CRUMBS 0.11.0, Module 1.0.0) - Compatible
76-
Found LED Array at 0x20 (CRUMBS 0.11.0, Module 1.0.0) - Compatible
77-
Found Servo Controller at 0x30 (CRUMBS 0.11.0, Module 1.0.0) - Compatible
75+
Found Calculator at 0x10 (CRUMBS 0.12.0, Module 1.0.0) - Compatible
76+
Found LED Array at 0x20 (CRUMBS 0.12.0, Module 1.0.0) - Compatible
77+
Found Servo Controller at 0x30 (CRUMBS 0.12.0, Module 1.0.0) - Compatible
7878

7979
Found 3 CRUMBS device(s):
8080
[0] Address 0x10, Type 0x03 (Calculator)

library.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "CRUMBS",
3-
"version": "0.11.0",
3+
"version": "0.12.0",
44
"description": "CRUMBS: a small, portable C-based protocol for controller/peripheral I2C messaging (Arduino + Linux HALs).",
55
"keywords": "i2c,crumbs,crc,arduino,linux,protocol",
66
"repository": {
@@ -14,7 +14,7 @@
1414
"maintainer": true
1515
}
1616
],
17-
"license": "GPL-3.0-or-later",
17+
"license": "AGPL-3.0-or-later",
1818
"frameworks": [
1919
"arduino"
2020
],
@@ -31,4 +31,4 @@
3131
"examples/handlers_usage/platformio/mock_controller",
3232
"examples/handlers_usage/platformio/mock_peripheral"
3333
]
34-
}
34+
}

0 commit comments

Comments
 (0)