is there a way to write arbitrary I2C (or UART) commands via a Macro?
something like READ_I2C_REGISTER_UINT32 A= R= or something like that?
I couldn’t find anything like that.
This actually surprises me, as you would have the option to greatly expand “custom” things for whatever kind of thing one might implement.
Most probably you didn’t develop some complex Macros, if you would - then immediately you would understand that it’s awful idea to use them for this kind of stuff, most obvious issue is Rendering/Execution of them.
If you want to introduce some low-level stuff you should develop new separate module (Extras) which is using Python for execution.
There is no generic capability to send messages to an i2c or spi device from a macro in the mainline Klipper. If anyone is curious though, I did implement a development branch with this flexibility - GitHub - KevinOConnor/klipper-dev at work-sensordebug-20231213