-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add powerSTEP01/L6480 support #12
Conversation
Using different header files (and supporting CPP files) allows the main code base to include support for different chips without making changes to this library.
Just added code to support the powerSTEP01/L6480 family. This may need to be split out into different libraries but … the files are almost identical which pushes toward one library. There is one header file (and supporting CPP) for the L6470 family and another set for the powerSTEP01/L6480 family. The only difference between the two header files are a few defines. The only difference between the two CPP files is which header file is pulled in. The changes that were made are:
|
I've rebased this onto the current
And to get this:
|
|
Co-Authored-By: Bob Kuhn <bob-the-kuhn@users.noreply.github.com>
I'll find out what that means and implement it.
Doesn't that mean that each stepper has its own unique version of chain? What the SPI transmit routine needs is a single array that contains all of the chain info for all of the steppers. I'll also replace the weak function definitions per an earlier comment. Are there other areas that need to be changed to provide a proper/standard method? |
When you declare a class member as |
…weak links for external SPI drivers
… remove weak links for external SPI drivers" This reverts commit 2a983ba.
…rduino-L6470 into SPI-chain-changes
…tion of the external PSI section
I've added subclasses for the L6470, L6480 and powerSTEP01. The L6470 and powerSTEP01 are functional. I don't have a L6480 to test with. I still need to test in a mixed system.. Scott - I can't find your message on how to setup the library to use external SPI transfer routines. In this commit all I did was remove the weak section but … that means the user that wants to use the internal SPI routines will get a link error because the code assumes the external SPI routines will be defined. I'll also need to re-visit the examples. |
…ged names of L6470 slew rate definitions to match data sheet
I've successfully tested this in a mixed system. I've also changed the library version. OPEN ITEMS:
|
The library has to be able to compile without any external references, unless those external references are also in libraries, in which case just add an include for the needed library header and state the dependency in the library manifest. WEAK references should be avoided, unless there's no alternative. |
Instead of weak linking functions and requiring certain functions to be defined by clients of the library, it would be better to define typedefs for the needed function signatures and store pointers to those functions inside the class.
|
The chain array is not specific to a stepper so it shouldn't be inside the L6470 class.
The PR moves the chain array out of the class and calls it L6470_chain.
STRANGE - I can't pull the latest dev branch code into my local copy. This PR shows a lot of false changes because of this. Hopefully Scott can fix this.