# Changelog

This page tracks changes between CosmicSDK releases.

## v1.2.3

- New Features

  - Added SDK version API: a static `getVersion()` method on `CosmicSDK` and `CosmicAsyncSDK`, plus a C-API counterpart, along with compile-time macros (`COSMICSDK_VERSION_MAJOR`, `COSMICSDK_VERSION_MINOR`, `COSMICSDK_VERSION_PATCH`, `COSMICSDK_VERSION_STRING`) for runtime and compile-time version checking.

  - Added a WebAssembly (WASM) build target using wasi-sdk, exposing an async C API (~44 exports wrapping `CosmicAsyncSDK`) with a lightweight JavaScript host runtime (~430 lines). Includes a `connectWasm()` path that bypasses HIDAPI enumeration for WASM environments and guards `std::thread` usage behind `#ifndef __wasm__`.

- Bug Fixes

  - Fixed a missing bounds check in `i2cScanBus` that could cause a buffer overread when the device response payload was smaller than expected.

  - Fixed subaddress byte-order (endianness) in I2C and I3C transfers to correctly serialize the sub-address in big-endian order.

- Documentation

  - Added known-issue documentation for I2C scan bus timeout behavior, covering both the synchronous `CosmicSDK` and the `CosmicAsyncSDK` API paths, across both the API reference documentation and the FAQ section.

  - Added a FAQ entry on Pull-up resistor requirements for I2C communication.

## v1.2.2

- Linux Packaging & Permissions

  - Added a user-facing Linux helper script install_udev_rules.sh for installing CosmicSDK udev permissions from delivered packages.

  - Updated Linux packaging to include scripts/install_udev_rules.sh and udev/65-binho-hid.rules in release artifacts.

  - Updated Linux installation/build docs to use the packaged user-facing script.

- Bug Fixes

  - Revert the inclusion of only public headers in the include folder.

## v1.2.1

- Language Bindings & Examples

  - Added a new Java reference integration layer wrapping the C API.

  - Added complete Java examples for system, i2c, i3c (basic/ccc/daa/hdr-ddr/hj-ibi), spi, uart, and gpio.

- Bug Fixes

  - Fixed the inclusion of the static HTML documentation on the docs folder of deliverable artifacts.

  - Fixed the inclusion of only public headers in the include folder.

  - Fixed the Python binding SyntaxError in i2c_scan_bus.

## v1.2.0

- New Features

  - Added full I3C support for Supernova across C++, C API, and Async API, including: controller configuration, bus initialization/reset, SDR and HDR-DDR transfers, target table management, and target configuration.

  - Added broad I3C CCC coverage, including GET/SET operations such as PID/BCR/DCR/STATUS/CAPS, ENEC/DISEC, RSTACT, SETDASA/SETAASA/SETNEWDA, ENTDAA, RSTDAA, MRL, and MWL.

  - Added SPI API support (controller init, parameter configuration, and transfer APIs).

  - Added UART API support enhancements (init and parameter configuration updates).

  - Added GPIO API support enhancements, including digital read/write and interrupt configuration/disable.

  - Added protocol-specific voltage configuration helpers for I2C, I3C, SPI, UART, and GPIO.

  - Added notification callback support and shared notification structures across C/C++ APIs.

  - Added I2C bus scanning support in examples and documentation.

- Language Bindings & Examples

  - Refactored Python integration examples into a structured binding-style layout.

  - Added complete Python protocol examples for system, i2c, i3c (basic/ccc/daa/hdr-ddr/hj-ibi), spi, uart, and gpio.

  - Added a new C# reference integration layer wrapping the C API.

  - Added complete C# examples for system, i2c, i3c (basic/ccc/daa/hdr-ddr/hj-ibi), spi, uart, and gpio.

  - Reorganized example folders and naming for consistency (for example i3c/basic_api to i3c/basic).

  - Added new blocking C and C++ examples for I2C, I3C, SPI, UART, GPIO, and system APIs.

- API & Naming Updates

  - Refined API naming consistency across C/C++ layers (including normalized I3c naming in C API symbols and camelCase alignment in I2C C API functions).

  - Standardized parameter naming in transfer APIs (inData / outData) and aligned several data-length types to uint16_t.

  - Updated I3C transfer options/event handling to use flag or mask-based interfaces in relevant APIs.

  - Added output length reporting for read APIs, including I3C SDR read and I3C HDR-DDR read paths.

- Build, Platform, and CI

  - Improved Linux build and CI support (including Ubuntu arm64 coverage and Linux dependency handling).

  - Updated macOS GitHub Actions runners to current labels to keep Intel and Apple Silicon CI builds supported.

  - Added support scripts and rules for Linux device access setup (udev flow).

  - Improved docs build behavior so documentation generation is optional when tools are unavailable.

- Documentation

  - Introduced a significantly expanded user-facing documentation set with Sphinx + Doxygen integration.

  - Added protocol guides, API references, constants/structures/result-code references, FAQ content, and improved examples documentation.

  - Improved onboarding/build documentation and README guidance.

- Bug Fixes

  - Fixed transaction ID rollover handling in blocking APIs.

  - Fixed read-length handling issues in selected I3C paths.

  - Fixed a cross-platform build issue (reported on Windows MinGW and Ubuntu) in the C API implementation of I3cGetDeviceTable.

  - Fixed several build and merge regressions introduced during 1.2.0 development.

  - Fixed multiple documentation rendering/formatting issues.

## v1.1.0

- General Improvements

  - Add support for connecting to a specific USB host adapter by its serial number.

## v1.0.0

- Initial public release of CosmicSDK.

- C++ synchronous API (CosmicSDK.hpp).

- C++ asynchronous API (CosmicAsyncSDK.hpp).

- C API (CosmicSDK_API_c.h).

- I2C only support for Supernova and Pulsar devices.