You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the TMC4671, but I suppose that my issue is valid for most other target chips.
The current version of the API requires the user to implement tmc*_readwriteByte. It implements its own tmc*_readInt and tmc*_writeInt, which in turn calls to that user-defined function.
This implies that the firmware is involved and makes calls between each byte of the datagram.
MCUs often offer the possibility to send multiple bytes at once (one API call, maybe even one peripheral trigger), allowing to send a whole datagram with much fewer operations.
To do that, I would like to be able to override the _readInt and _writeInt functions with my own functions, written appropriately for the MCU I am using.
I understand that it is a good idea to let the current functions be there, for simplicity. However, making them weak would also let the user write their own, more efficient, version.
I have just tested that in my personal clone of TMC-API, with great success:
Please consider making these functions weak, so that users can use your library without modifications.
Note: attributes to make weak symbols are not part of the C standard, so this might require some kind of pre-processor-fu. But I don't think that this is very difficult.
The text was updated successfully, but these errors were encountered:
I am using the TMC4671, but I suppose that my issue is valid for most other target chips.
The current version of the API requires the user to implement
tmc*_readwriteByte
. It implements its owntmc*_readInt
andtmc*_writeInt
, which in turn calls to that user-defined function.This implies that the firmware is involved and makes calls between each byte of the datagram.
MCUs often offer the possibility to send multiple bytes at once (one API call, maybe even one peripheral trigger), allowing to send a whole datagram with much fewer operations.
To do that, I would like to be able to override the
_readInt
and_writeInt
functions with my own functions, written appropriately for the MCU I am using.I understand that it is a good idea to let the current functions be there, for simplicity. However, making them weak would also let the user write their own, more efficient, version.
I have just tested that in my personal clone of TMC-API, with great success:
Please consider making these functions weak, so that users can use your library without modifications.
Note: attributes to make weak symbols are not part of the C standard, so this might require some kind of pre-processor-fu. But I don't think that this is very difficult.
The text was updated successfully, but these errors were encountered: