analogdevicesinc / TMC-API

TRINAMIC's IC API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation says user needs to implement wrong function for TMC4671

bigbrett opened this issue · comments

The documentation in README.md states:

To use the TMC-API, perform the following steps in your code:

  • Implement the tmcXXXX_readWriteArray() function in in your code. This function provides the necessary hardware access to the TMC-API.

But in the TMC4671 IC driver this function does not exist. Instead, it seems that the code wants you to implement tmc4671_readWriteByte()

// => SPI wrapper
extern uint8_t tmc4671_readwriteByte(uint8_t motor, uint8_t data, uint8_t lastTransfer);
// <= SPI wrapper

Additionally, looking at other ICs, each function has a differently named wrapper implementation. This should be made uniform, or at least documented to the user so they know where to look (e.g. "Every IC has a function prototype marked as extern that the user needs to implement in order for the driver to communicate with the chip...` or something like that).

Hi,

the use of the wrapper function for the TMC4671 is shown here in our Eval-System firmware:

https://github.com/trinamic/TMC-EvalSystem/blob/master/boards/TMC4671_eval.c

from line 60 onwards.

Best regards,
Enrico

Yep thanks I see how it is intended to be used, I'm just pointing out that the documentation in the API README.md is incorrect

Ok, thanks! We will update the Readme file.

commented

would be nice to see the README updated, confused the hell out of me too for the 2240