VMX-pi C++ HAL Library for Raspberry Pi
VMX-pi Robotics Controller & Vision/Motion Processor
|
Contains the configuration data for a VMXResource whose VMXResourceType is PWMCaptureConfig. More...
#include <VMXResourceConfig.h>
Public Types | |
enum | PWMCaptureTimeout { NONE, x1, x2, x3 } |
PWM Capture Timeout. | |
Public Types inherited from InputCaptureConfig | |
enum | CounterClockSource { INTERNAL, EDGEDETECT_CH1, FILTERED_CH1, FILTERED_CH2 } |
enum | CounterDirection { DIRECTION_UP, DIRECTION_DN } |
enum | SlaveMode { SLAVEMODE_DISABLED, SLAVEMODE_RESET, SLAVEMODE_GATED, SLAVEMODE_TRIGGER, SLAVEMODE_FILTERED_INPUT_TRIGGER } |
enum | SlaveModeTriggerSource { TRIGGER_EDGEDETECT_CH1, TRIGGER_FILTERED_CH1, TRIGGER_FILTERED_CH2, TRIGGER_DYNAMIC } |
enum | CaptureChannelSource { CAPTURE_SIGNAL_A, CAPTURE_SIGNAL_B, CAPTURE_SIGNAL_DYNAMIC } |
enum | CaptureChannelActiveEdge { ACTIVE_RISING, ACTIVE_FALLING, ACTIVE_BOTH } |
enum | CaptureChannelPrescaler { x1, x2, x4, x8 } |
enum | StallAction { ACTION_NONE, ACTION_CLEAR_COUNTER } |
enum | VirtualCounterMode { VC_MODE_DISABLED, VC_MODE_DUTYCYCLE_ENCODER, VC_MODE_DUAL_INPUT_UPDOWN } |
enum | VirtualCounterSource { VC_SOURCE_CH1, VC_SOURCE_CH2 } |
Public Types inherited from InputCaptureConfigBase | |
enum | CaptureChannel { CH1, CH2 } |
Public Member Functions | |
PWMCaptureConfig () | |
PWMCaptureConfig default constructor; sets all values to defaults. | |
PWMCaptureConfig (uint32_t microseconds_per_tick, PWMCaptureTimeout capture_timeout) | |
PWMCaptureConfig constructor; initializes values with the provided input parameters *. More... | |
void | InternalInit (uint32_t microseconds_per_tick, PWMCaptureTimeout capture_timeout) |
PWMCaptureTimeout | GetTimeout () |
Returns the configured PWMCaptureTimeout. More... | |
void | SetTimeout (PWMCaptureTimeout capture_timeout) |
Sets the configured PWMCaptureTimeout. More... | |
virtual size_t | GetSize () const |
virtual VMXResourceConfig * | GetCopy () const |
Instantiates a copy of the configuration data. More... | |
virtual bool | Copy (const VMXResourceConfig *p_config) |
Copies the contents of the source VMXResourceConfig object into this object. More... | |
Public Member Functions inherited from InputCaptureConfig | |
uint32_t | GetMicrosecondsPerTick () |
Returns the configured Input Capture (internal clock source) Microseconds per Tick Rate. More... | |
void | SetMicrosecondsPerTick (uint32_t microseconds_per_tick) |
Sets the configured Input Capture (internal clock source) Microseconds per Tick Rate. More... | |
void | SetCounterClockSource (CounterClockSource counter_clock_source) |
CounterClockSource | GetCounterClockSource () |
void | SetCounterDirection (CounterDirection counter_direction) |
CounterDirection | GetCounterDirection () |
void | SetSlaveMode (SlaveMode slave_mode) |
SlaveMode | GetSlaveMode () |
void | SetSlaveModeTriggerSource (SlaveModeTriggerSource slave_mode_trigger_source) |
SlaveModeTriggerSource | GetSlaveModeTriggerSource () |
void | SetCaptureChannelSource (CaptureChannel capture_channel, CaptureChannelSource source) |
CaptureChannelSource | GetCaptureChannelSource (CaptureChannel capture_channel) |
void | SetCaptureChannelActiveEdge (CaptureChannel capture_channel, CaptureChannelActiveEdge active_edge) |
CaptureChannelActiveEdge | GetCaptureChannelActiveEdge (CaptureChannel capture_channel) |
void | SetCaptureChannelPrescaler (CaptureChannel capture_channel, CaptureChannelPrescaler prescaler) |
CaptureChannelPrescaler | GetCaptureChannelPrescaler (CaptureChannel capture_channel) |
void | SetStallAction (StallAction stall_action) |
StallAction | GetStallAction () |
void | SetVirtualCounterMode (VirtualCounterMode vc_mode) |
VirtualCounterMode | GetVirtualCounterMode () |
void | SetVirtualCounterSource (VirtualCounterSource vc_source) |
VirtualCounterSource | GetVirtualCounterSource () |
void | SetVirtualCounterParameter1 (uint16_t value) |
uint16_t | GetVirtualCounterParameter1 () |
void | SetVirtualCounterParameter2 (uint16_t value) |
uint16_t | GetVirtualCounterParameter2 () |
void | SetVirtualCounterDutyCycleEncoderLowTicks (uint16_t value) |
uint16_t | GetVirtualCounterDutyCycleEncoderLowTicks () |
void | SetVirtualCounterDutyCycleEncoderHighTicks (uint16_t value) |
uint16_t | GetVirtualCounterDutyCycleEncoderHighTicks () |
Public Member Functions inherited from InputCaptureConfigBase | |
InputCaptureConfigBase (VMXResourceType resource_type) | |
void | SetStallTimeout20MsPeriods (uint8_t stall_timeout_20ms_periods) |
uint8_t | GetStallTimeout20MsPeriods () |
void | SetCaptureChannelFilter (CaptureChannel capture_channel, uint8_t filter) |
uint8_t | GetCaptureChannelFilter (CaptureChannel capture_channel) |
uint8_t | GetClosestCaptureChannelFilter (uint32_t period_nanoseconds) |
uint8_t | GetClosestCaptureCaptureFilterNumSamples (uint32_t num_samples) |
uint32_t | GetCaptureChannelFilterPeriodNanoseconds (uint8_t filter) |
uint32_t | GetCaptureChannelFilterNumSamples (uint8_t filter) |
Public Member Functions inherited from VMXResourceConfig | |
VMXResourceConfig (VMXResourceType res_type) | |
VMXResourceType | GetResourceType () const |
VMXResourceType which this configuration applies to. | |
Public Attributes | |
PWMCaptureTimeout | capture_timeout |
Public Attributes inherited from InputCaptureConfig | |
uint32_t | microseconds_per_tick |
Specifies the Input Capture internal clock source resolution (number of microseconds per tick) | |
CounterClockSource | counter_clock_source |
CounterDirection | counter_direction |
SlaveMode | slave_mode |
SlaveModeTriggerSource | slave_mode_trigger_source |
CaptureChannelSource | capture_channel_source [2] |
CaptureChannelActiveEdge | capture_channel_active_edge [2] |
CaptureChannelPrescaler | capture_channel_prescaler [2] |
StallAction | stall_action |
VirtualCounterMode | virtual_counter_mode |
VirtualCounterSource | virtual_counter_source |
uint16_t | virtual_counter_parameter1 |
uint16_t | virtual_counter_parameter2 |
Public Attributes inherited from InputCaptureConfigBase | |
uint8_t | capture_channel_filter [2] |
uint8_t | stall_timeout_20ms_periods |
Public Attributes inherited from VMXResourceConfig | |
VMXResourceType | res_type |
Contains the configuration data for a VMXResource whose VMXResourceType is PWMCaptureConfig.
|
inline |
PWMCaptureConfig constructor; initializes values with the provided input parameters *.
edge_type | The PWM Capture CaptureEdge |
|
inlinevirtual |
Copies the contents of the source VMXResourceConfig object into this object.
NOTE: The source object's VMXResourceType must match this object's VMXResourceType.
[in] | p_config | The source VMXResourceConfig object from which to copy configuration data into this object. |
Reimplemented from InputCaptureConfig.
|
inlinevirtual |
Instantiates a copy of the configuration data.
NOTE: The caller is responsible to delete the object returned from this method.
Reimplemented from InputCaptureConfig.
|
inline |
Returns the configured PWMCaptureTimeout.
NOTE: Deprecated; use InputCapture::GetStallTimeout20MsPeriods() instead.
|
inline |
Sets the configured PWMCaptureTimeout.
NOTE: Deprecated; use InputCapture::SetStallTimeout20MsPeriods() instead.