Open playfulFence opened 4 months ago
With the esp32-open-mac project, we discovered this as well, since the proprietary Wi-Fi stack calls i2c_readReg_Mask
at least 30 times. My hypothesis is, that the RF frontend, which Espressif licensed from Ceva, is intended to be integrable into another chip separate from the baseband and be addressed over I2C. We're ignoring the RF init for now.
I know you likely can't share info on this, but that's what we found.
It would be nice to do something about them
regi2c_*
functions (see example below), because honestly, every time I need to use them is a huge pain + a lot of noise in the code base: extra raw register address definitions, basic low-level functions (which are repeating through the whole code base) and so on.As you can see on the example below, one operation requires a lot of collateral registers/values definitions, functions and other things, which create A) Inconvenience of work B) Noise in a codebase.
I see couple of reasons why we didn't solve it yet: A) Some of required registers are not in
PAC
s yet, so we can't use related functions ( e.g..modify()
) B) Lack of knowledge about this functionality (It is documented literally nowhere, neither in the IDF nor in TRM)At this point the code pretty much copies the
IDF
approach (mostly due to the reasonB
from above š ), but I'm sure we can make it more convenient.Example: