Help with adding an I2C recovery pulse

Hello,

I'd like to add the transmission of an I2C recovery pulse (where you toggle SCK 10 times) to my startup routine for an offboard device whose state I'm uncertain of.

I've been looking through the drivers in i2c_nrfx_twim.c and i2c_nrfx_twi.c to see if it's supported and I found i2c_nrfx_twim_recover_bus() in i2c_nrfx_twim.c, but that function calls nrfx_twim_bus_recover(), and I haven't been able to find that function defined anywhere.

I started trying to write my own version of i2c_nrfx_twim_recover_bus() hoping to use direct GPIO access to the port pins if such a thing is still possible and clock out the pulse train with a k_sleep() kind of delay between edges. But I'm getting confused on how to get from the device pointer structure that I have in my third party device driver to the one I need.
Here are some images that show the error:
Thanks for the continued help!
Glen
Related