1#ifndef TMC9660_RAMDEBUG_HPP
2#define TMC9660_RAMDEBUG_HPP
91 return static_cast<uint16_t
>((
static_cast<uint8_t
>(sub) << 6) | (index & 0x3F));
static constexpr uint8_t RAMDEBUG_UART_CMD
UART command number for RAMDebug.
Definition tmc9660_ramDebug.hpp:21
static constexpr uint8_t RAMDEBUG_BLOCK
Block number for RAMDebug (SPI interface)
Definition tmc9660_ramDebug.hpp:19
InfoSelect
RAMDebug info selections (for subcommand GetInfo)
Definition tmc9660_ramDebug.hpp:48
@ CapturedSamples
Number of samples already captured.
@ PrescalerOnTrigger
Prescaler value at the trigger event.
@ FrequencyHz
RAMDebug frequency in Hz.
@ MaxSamples
Maximum number of samples supported.
@ MaxChannels
Maximum number of channels supported.
static uint16_t ramDebugOffset(RamDebugSub sub, uint8_t index=0)
Construct the RAMDebug register offset for a given subcommand and index.
Definition tmc9660_ramDebug.hpp:90
RamDebugSub
RAMDebug subcommands.
Definition tmc9660_ramDebug.hpp:27
@ GetPreTriggerCount
Read the total number of pretrigger samples.
@ TriggerStart
Set trigger type and start measurement.
@ SetSampleCount
Set the total number of samples to collect.
@ SetTriggerChannel
Configure the trigger channel.
@ GetChannelType
Read the configured channel type.
@ SetPrescaler
Set the prescaler (divider = value + 1).
@ GetChannelAddress
Read the configured channel address.
@ SetPreTriggerCount
Set the total number of pretrigger samples.
@ Init
Initialize and reset RAMDebug.
@ SetTriggerMaskShift
Set mask and shift before trigger evaluation.
@ GetState
Read the current RAMDebug state.
@ GetInfo
Read general RAMDebug information.
@ ReadSample
Read a captured sample by index.
@ SetChannel
Configure a capture channel.
RamDebugState
RAMDebug states (returned by GetState)
Definition tmc9660_ramDebug.hpp:60
@ PreTrigger
Capturing pretrigger samples.
@ Capture
Capturing samples after the trigger.
@ Complete
Capture is complete, samples can be downloaded.
@ Idle
RAMDebug is not running and can be configured.
@ Trigger
Waiting for the trigger event.
TriggerType
Trigger types (for TriggerStart)
Definition tmc9660_ramDebug.hpp:72
@ FallingEdgeU
Trigger on unsigned falling edge.
@ AnyEdgeU
Trigger on any unsigned edge.
@ FallingEdgeS
Trigger on signed falling edge.
@ RisingEdgeU
Trigger on unsigned rising edge.
@ RisingEdgeS
Trigger on signed rising edge.
@ AnyEdgeS
Trigger on any signed edge.
Definition tmc9660_adc.hpp:12