The OpenI2C2(...) family of functions are parts of plib peripheral libraries that up until now have been distributed together with XC8 compiler.
There are some examples using these functions in some example collections,
but most I2C Plib examples shown by Microchip are very simplistic demo code in blocking and standalone configurations without error handling nor recovery.
There have been several examples and libraries contributed in forum contributions.
For documentation, there exists a MPLAB_XC8_peripheral_libraries.pdf in a subdirectory of the compiler installation,
but it seem to contain a lot of headlines and no real information.
Comments in source code and header files seem to be the most relevant information.
For understanding "sync_mode" and "slew" arguments, the most useful approach might be to follow what settings the code do in SFR registers, and study device datasheet for the PIC18 device you are actually using, MSSP I2C chapter.
As I understand, Plib code is going to be separated from compiler distribution in the future,
and may be distributed as a separate installation, but may also be retired from further development.
Instead MCC, Microchip Code Configurator, is more probably the focus of I2C development and support.
It already contain the makings of a interrupt driven I2C driver that may perform non-blocking operations,
that work so far for my purpose, but as far as I have seen still have room for improvement.
post edited by Mysil - 2015/08/11 09:54:20