Subsystem for TMCL script execution control.
More...
#include <TMC9660.hpp>
|
| bool | upload (const std::vector< uint32_t > &scriptData) noexcept |
| | Upload a TMCL script to the TMC9660's internal memory.
|
| |
| bool | start (uint16_t address=0) noexcept |
| | Start or restart execution of the stored script.
|
| |
| bool | stop () noexcept |
| | Stop execution of the running script.
|
| |
| bool | step () noexcept |
| | Execute a single TMCL instruction of the loaded script.
|
| |
| bool | reset () noexcept |
| | Reset the TMCL program counter.
|
| |
| bool | getStatus (uint32_t &status) noexcept |
| | Query the execution state of the running script.
|
| |
| bool | readMemory (uint16_t address, uint32_t &value) noexcept |
| | Read a 32-bit instruction from script memory.
|
| |
| bool | addBreakpoint (uint16_t address) noexcept |
| | Add a breakpoint at the given address.
|
| |
| bool | removeBreakpoint (uint16_t address) noexcept |
| | Remove a previously set breakpoint.
|
| |
| bool | clearBreakpoints () noexcept |
| | Remove all breakpoints from the script.
|
| |
| bool | getMaxBreakpointCount (uint32_t &count) noexcept |
| | Query the maximum number of supported breakpoints.
|
| |
Subsystem for TMCL script execution control.
◆ Script()
| TMC9660::Script::Script |
( |
TMC9660 & |
parent | ) |
|
|
inlineexplicitprivatenoexcept |
◆ addBreakpoint()
| bool TMC9660::Script::addBreakpoint |
( |
uint16_t |
address | ) |
|
|
noexcept |
Add a breakpoint at the given address.
- Parameters
-
| address | Instruction address where execution should break. |
- Returns
- true if the breakpoint was set.
◆ clearBreakpoints()
| bool TMC9660::Script::clearBreakpoints |
( |
| ) |
|
|
noexcept |
Remove all breakpoints from the script.
- Returns
- true if the command succeeded.
◆ getMaxBreakpointCount()
| bool TMC9660::Script::getMaxBreakpointCount |
( |
uint32_t & |
count | ) |
|
|
noexcept |
Query the maximum number of supported breakpoints.
- Parameters
-
| [out] | count | Maximum breakpoint count reported by the device. |
- Returns
- true on success.
◆ getStatus()
| bool TMC9660::Script::getStatus |
( |
uint32_t & |
status | ) |
|
|
noexcept |
Query the execution state of the running script.
- Parameters
-
| [out] | status | Raw status value returned by GetStatusScript. |
- Returns
- true if the status value was retrieved successfully.
◆ readMemory()
| bool TMC9660::Script::readMemory |
( |
uint16_t |
address, |
|
|
uint32_t & |
value |
|
) |
| |
|
noexcept |
Read a 32-bit instruction from script memory.
- Parameters
-
| address | Instruction address to read. |
| [out] | value | Returned 32-bit TMCL instruction word. |
- Returns
- true on success.
◆ removeBreakpoint()
| bool TMC9660::Script::removeBreakpoint |
( |
uint16_t |
address | ) |
|
|
noexcept |
Remove a previously set breakpoint.
- Parameters
-
| address | Address of the breakpoint to remove. |
- Returns
- true if removed successfully.
◆ reset()
| bool TMC9660::Script::reset |
( |
| ) |
|
|
noexcept |
Reset the TMCL program counter.
Sends the ApplReset command which stops execution and resets the script to the beginning.
◆ start()
| bool TMC9660::Script::start |
( |
uint16_t |
address = 0 | ) |
|
|
noexcept |
Start or restart execution of the stored script.
- Parameters
-
| address | The address from which to start execution (usually 0 for beginning of script). |
- Returns
- true if the command to start the script was sent.
◆ step()
| bool TMC9660::Script::step |
( |
| ) |
|
|
noexcept |
Execute a single TMCL instruction of the loaded script.
Uses the ApplStep opcode which advances the interpreter by one instruction. Useful for debugging scripts in real time.
◆ stop()
| bool TMC9660::Script::stop |
( |
| ) |
|
|
noexcept |
Stop execution of the running script.
- Returns
- true if the stop command was sent successfully.
◆ upload()
| bool TMC9660::Script::upload |
( |
const std::vector< uint32_t > & |
scriptData | ) |
|
|
noexcept |
Upload a TMCL script to the TMC9660's internal memory.
This enters download mode, writes a series of instructions to the device memory, and exits download mode. The script will typically run on device startup or when triggered.
- Parameters
-
| scriptData | Vector of 32-bit instructions representing the TMCL script. |
- Returns
- true if the script was uploaded successfully.
◆ TMC9660
◆ driver
The documentation for this struct was generated from the following files: