![]() |
LibSpindle-C-Library 1.0
Library Code documentation
|
The following code documentation is a set of tipps and diagramms as well as function and structure descriptions which help when using the library. It is used to increase the implementation speed. Some examples are attached in this documentation as well
There are no additional static compile flags or DEFINES which the user can configure
The library is implemented as a singleton pattern. This means that only one instance can be created at runtime. Calling the SPINDLE_CreateInstance multiple times will succeed but always the pointer of the first instance will be returned.
The following example shows how to create a instance of the spindle controller library.
The following example shows the usage of the spindle library via console. With the spindle command the user can start or stop the spindle and it can also change the spindle speed with the start command The command returns OK or FAIL in the given cases of failure or success. There is also a status command. It returns the state of the spindle (turning) and the RPM which has been set. It also terminates with "OK" or "FAIL"