How keterez/fbl_library works
HydraX1 is an embedded sensor-and-actuator library: callers initialize the board, wait for and calibrate an AS5600L magnetic angle sensor, read its angle, and write actuator output. The sensor accesses registers through a shared I2C abstraction; board services provide logging, delays, and pin output. Arduino I2C is implemented in the sampled code. The README describes an STM32 I2C backend, but the supplied tree has no STM32 I2C implementation, so that branch is documented but unverified here.
Main entry points: as5600l.cpp AS5600L Driver · HydraX1.cpp HydraX1 API · I2C.h I2C Contract · Platform.h Platform Selector
Components 13
HydraX1 Control
- HydraX1 API
HydraX1.cpp - HydraX1 Interface
HydraX1.h
Angle Sensing
- Angle Constants
constatns.h - AS5600L Driver
src/as5600l.cpp
I2C Transport
- I2C Contract
src/platforms/I2C.h - I2C Bus Factory
src/platforms/I2C.cpp - Arduino I2C
src/platforms/arduino/arduinoI2C.cpp - STM32 I2C Backend
src/platforms/stm32
Platform Services
- Platform Selector
src/platforms/Platform.h - Arduino Services
src/platforms/arduino/ArduinoPlatform.h - STM32 Services
src/platforms/stm32/STM32Platform.h
Other components
- Library Caller
- Arduino Wire
Connections 12
- Library Caller → HydraX1 API: calls
- HydraX1 API → AS5600L Driver: initializes, calibrates, reads
HydraX1.cpp - HydraX1 API → Platform Selector: uses services
HydraX1.cpp - HydraX1 Interface → AS5600L Driver: declares sensor
HydraX1.h - AS5600L Driver → I2C Contract: reads and writes registers
src/as5600l.cpp - AS5600L Driver → Angle Constants: uses angle constant
- I2C Contract → Arduino I2C: aliases implementation
src/platforms/I2C.h - I2C Bus Factory → Arduino I2C: constructs bus
src/platforms/I2C.cpp - Arduino I2C → Arduino Wire: transfers bytes
src/platforms/arduino/arduinoI2C.cpp - I2C Contract → STM32 I2C Backend: backend described
readme.txt - Platform Selector → Arduino Services: selects on Arduino
src/platforms/Platform.h - Platform Selector → STM32 Services: selects on STM32
src/platforms/Platform.h