[SOLVED] ST-LINK V3 Bridge API
Hello,
Wondering if anyone out there is knowledgeable in the ST-LINK V3 Bridge API? I'm working on a personal project developing a GUI application that uses the API to provide something like a Bus Pirate type development tool. If you want to look at bad C/C++ code the project is on GitHub. I've gotten the GPIO portion to work and am working on I2C. My specific question is this:
The I2C read/write methods take a parameter for returning the actual number of bytes written on the bus. Here's one of the methods signature:
Brg_StatusT WriteI2C(const uint8_t *pBuffer, uint16_t Addr, uint16_t SizeInBytes, uint16_t *pSizeWritten);pSizeWritten is the parameter in question. It seems to always return zero even though the BrgStatusT return value is BRG_NO_ERR. I've looked at the bus on the scope and can see bytes written/read and they appear correct.
So is this a misuse/misunderstanding of the API on my part or a bug in the bridge sources or a bug in the DLL or cosmic interference??
EDIT: Forgot any kind of version info:
ST-LINK V3SET - fw ver V3J7M2B4S1
ST-LINK V3 Bridge API version - 1
ST-LINK USB Driver DLL version (from windows) - 5.1.3.0, this I think corresponds to 2.36.26 of STSW-LINK007
WIN 10 machine
Thanks for your time,
Andy
