Changelog¶
What changed in each release of the driver. Entries marked BREAKING need source changes in code that used the affected API.
Unreleased¶
The build settings carry version 1.0.0; no release has been tagged yet.
Added¶
- SPI and UART-SHTP reference ports for ESP-IDF,
examples/esp32/main/esp32_bno08x_spi_bus.hpp(mode 3 at 3 MHz, header-first reads in one chip select, PS0/WAKE handling) andesp32_bno08x_uart_bus.hpp(3 Mbit/s, buffer status query, 100 µs host byte spacing), with the example appsspi_pollinganduart_shtp_polling. inc/bno08x_shtp_uart.hpp: portable UART-SHTP framing (flags, protocol IDs, byte stuffing, buffer status) for any UART port, with host tests.- Every ESP32 example app is now built by CI (
ci_enabled: trueinapp_config.yml). - Host unit tests (
-DHF_BNO08X_BUILD_TESTS=ON) against a mock transport: UART-RVC parsing with the datasheet's example frame, interface and state guards, reset and bootloader pin sequences, DFU image checks. A CI workflow runs them with GCC and Clang.
Fixed¶
SelectInterface()drove PS1/PS0 swapped for the two UART modes:UARTselected UART-RVC andUARTRVCselected UART-SHTP. It now follows datasheet figure 1-5 (PS1/PS0 = 01 UART-RVC, 10 UART); I2C and SPI were already right. BREAKING for boards that called it with the swapped value to work around the bug.HardwareReset()waited 50 ms after releasing NRST, shorter than the hub's start-up time. It now waitsRESET_STARTUP_MS= 94 ms: t1 (internal initialization, at least 90 ms) plus t2 (internal configuration, about 4 ms), datasheet section 6.5.3, figure 6-8.EnterBootloader()andExitBootloaderAndReboot()use it too, so each takes 44 ms longer.- A program with more than one source file calling
DfuFromMemory()/RunDfuFromMemory()failed to link with Apple clang (duplicate thread-local wrapper symbols forMemoryFirmware's state). The adapter keeps its per-thread state in function-local statics now. - Firmware update over I2C never reached the bootloader: the driver kept talking to the application address
(
0x4A/0x4B) while the bootloader answers at0x28/0x29(datasheet section 1.4). I2C ports can now provide the optionalGetI2cAddress()/SetI2cAddress()hooks;Dfu(),DfuWithOptions(),DfuFromMemory()andRunDfuFromMemory()switch the port toBootloaderI2cAddress()of its address (same SA0 bit) for the transfer and restore it on every path. A failed switch returnsSH2_ERR_IO; an address that is not a BNO08x address returnsSH2_ERR_BAD_PARAM. Ports without the hooks behave as before. The ESP32 I2C port and the documented port implement them. - A second
BNO085object'sBegin()silently reset the SH-2 session of the first: CEVA's SH-2 library keeps one global session, andsh2_open()clears it before it fails.Begin()now refuses while another object's session is open, with the new errorBNO08X_ERR_SH2_SESSION_IN_USE(-100), and touches neither the library nor the bus;Close()and the destructor free the session, andSh2SessionInUse()reports it. UART-RVC and DFU are not affected. cmake --installcopied onlyinc/, whilebno08x.hppincludesbno08x.ipp,dfu/HcBin.h, the SH-2 headers and (through the.ipp)dfu/MemoryFirmware.hpp, so an installed package did not compile. The install now ships all of them, and the header includesbno08x.ippthrough the include path instead of../src/bno08x.ipp. The installed target is exported as the documentedhf::bno08x(washf::hf_bno08x, kept as an alias by the package config). A new ctest,hf_bno08x_install_consumer, builds afind_package()consumer against a fresh install.
Changed¶
-
The port's
GpioSet()now returnsbool(true= pin driven or not wired,false= GPIO error), and the driver passes it on:HardwareReset(),SetBootPin(),SetWakePin()andSelectInterface()returnboolinstead ofvoid, andEnterBootloader()/ExitBootloaderAndReboot()fail withSH2_ERR_IOand close the port.HardwareReset()stops at a failed RSTN write instead of waiting. Ports with avoidGpioSet()still compile (detected at compile time) and are treated as never failing; any other return type is a compile error, so an SDK status code is not read as a bool. Calls that ignore the result compile as before; code that takes the address of one of the four member functions needs the new type. The ESP32 example ports returnfalseon an ESP-IDF error. -
Documentation moved to the HardFOC MkDocs platform: new page set (quickstart, hardware, architecture, API guide, porting, UART-RVC mode, firmware update, testing), code snippets compiled by the host build from
tests/docs/, Doxygen under/api/, versioned with mike. The Jekyll site files and the doxygen-awesome submodule are gone.