![]() |
PS_Fgen_FW
4da88f4073c1cc65ea45c3a652a2751e495e50db
Firmware for an Power Supply and Function Generator build from an ATX power supply
|
Direct digital synthesis channel. More...
#include <DDS_Channel.h>
Public Member Functions | |
| DDS_Channel (uint8_t ddsChannelNumber, float minFreq, float maxFreq, float minAmpl, float maxAmpl, float minOffset, float maxOffset) | |
| Constructor of the DDS_Channel. | |
| void | UpdateIncrement () |
| Update the increment value based on the Frequency. | |
| void | UpdateWaveTable () |
| Update the WaveTable based on the SignalForm, Amplitude and Offset. | |
| void | UpdateOriginalWaveTable () |
| Update the pointer to the original WaveTable based on the SignalForm. | |
| bool | SetEnabled (bool enabled) |
| Set the Enabled property of the DDS channel. | |
| bool | GetEnabled () |
| Get the Enabled property of the DDS channel. | |
| bool | SetFrequency (float frequency) |
| Set the Frequency property of the DDS channel. | |
| float | GetFrequency () |
| Get the Frequency property of the DDS channel. | |
| bool | SetAmplitude (float amplitude) |
| Set the Amplitude property of the DDS channel. | |
| float | GetAmplitude () |
| Get the Amplitude property of the DDS channel. | |
| bool | SetOffset (float offset) |
| Set the Offset property of the DDS channel. | |
| float | GetOffset () |
| Get the Offset property of the DDS channel. | |
| bool | SetSignalForm (SignalForms_t signalForm) |
| Set the SignalForm property of the DDS channel. | |
| SignalForms_t | GetSignalForm () |
| Get the SignalForm property of the DDS channel. | |
| bool | SetPWMValue (float pwmValue) |
| Set the PWM_Value property of the DDS channel. | |
| float | GetPWMValue () |
| Get the PWM_Value property of the DDS channel. | |
Public Member Functions inherited from Channel | |
| Channel (ChannelTypes_t channelType) | |
| Constructor of the Channel class. | |
| ChannelTypes_t | GetChannelType () |
| Function that can be used to return the _channelType property. | |
Static Public Member Functions | |
| static void | DDSFrequencyChanged (void *channel) |
| Callback function that can be used for user interface controls modifying the Frequency property. | |
| static void | DDSAmplitudeChanged (void *channel) |
| Callback function that can be used for user interface controls modifying the Amplitude property. | |
| static void | DDSOffsetChanged (void *channel) |
| Callback function that can be used for user interface controls modifying the Offset property. | |
| static void | DDSSignalFormChanged (void *channel) |
| Callback function that can be used for user interface controls modifying the SignalForm property. | |
| static void | DDSPWMValueChanged (void *channel) |
| Callback function that can be used for user interface controls modifying the PWM_Value property. | |
| static void | DDSEnabledChanged (void *channel) |
| Callback function that can be used for user interface controls modifying the Enabled property. | |
Public Attributes | |
| uint8_t | DdsChannelNumber |
| 1-based channel number (DDS1 => 1, DDS2 => 2) | |
| Parameter< bool > | Enabled |
| Is the channel enabled or not. | |
| Parameter< float > | Frequency |
| Frequency of the DDS channel. | |
| Parameter< float > | Amplitude |
| Amplitude of the DDS channel. | |
| Parameter< float > | Offset |
| Offset of the DDS channel. | |
| Parameter< SignalForms_t > | SignalForm |
| Signalform of the DDS channel. | |
| Parameter< float > | PWM_Value |
| PWM value of the DDS channel. | |
| volatile const uint16_t * | OriginalWaveTable |
| Pointer to the constant wave table holding the unmodified points of the signal determined by the SignalForm parameter. | |
| volatile uint16_t * | p_WaveTable |
| Pointer to the wave table array holding the modified waveform points (adapted to waveform and offset) | |
| volatile uint32_t * | p_Increment |
| Pointer to the increment variable (calculated from the Frequency setting) | |
Additional Inherited Members | |
Protected Attributes inherited from Channel | |
| ChannelTypes_t | _channelType |
| Type of the channel. | |
Direct digital synthesis channel.
This is a channel holding all parameters of a DDS implementation.
| DDS_Channel::DDS_Channel | ( | uint8_t | ddsChannelNumber, |
| float | minFreq, | ||
| float | maxFreq, | ||
| float | minAmpl, | ||
| float | maxAmpl, | ||
| float | minOffset, | ||
| float | maxOffset ) |
Constructor of the DDS_Channel.
| ddsChannelNumber | 1-based channel number (DDS1 => 1, DDS2 => 2) |
| minFreq | Minimum allowed frequency for the DDS channel |
| maxFreq | Maximum allowed frequency for the DDS channel |
| minAmpl | Minimum allowed amplitude for the DDS channel |
| maxAmpl | Maximum allowed amplitude for the DDS channel |
| minOffset | Minimum allowed offset for the DDS channel |
| maxOffset | Maximum allowed offset for the DDS channel |
|
static |
Callback function that can be used for user interface controls modifying the Amplitude property.
| channel | Pointer to a DDS_Channel |
|
static |
Callback function that can be used for user interface controls modifying the Enabled property.
| channel | Pointer to a DDS_Channel |
|
static |
Callback function that can be used for user interface controls modifying the Frequency property.
| channel | Pointer to a DDS_Channel |
|
static |
Callback function that can be used for user interface controls modifying the Offset property.
| channel | Pointer to a DDS_Channel |
|
static |
Callback function that can be used for user interface controls modifying the PWM_Value property.
| channel | Pointer to a DDS_Channel |
|
static |
Callback function that can be used for user interface controls modifying the SignalForm property.
| channel | Pointer to a DDS_Channel |
|
inline |
Get the Amplitude property of the DDS channel.
|
inline |
Get the Enabled property of the DDS channel.
|
inline |
Get the Frequency property of the DDS channel.
|
inline |
Get the Offset property of the DDS channel.
|
inline |
Get the PWM_Value property of the DDS channel.
|
inline |
Get the SignalForm property of the DDS channel.
| bool DDS_Channel::SetAmplitude | ( | float | amplitude | ) |
Set the Amplitude property of the DDS channel.
| amplitude | New value for the Amplitude property |
| bool DDS_Channel::SetEnabled | ( | bool | enabled | ) |
Set the Enabled property of the DDS channel.
| enabled | New value for the Enabled property |
| bool DDS_Channel::SetFrequency | ( | float | frequency | ) |
Set the Frequency property of the DDS channel.
| frequency | New value for the Frequency property |
| bool DDS_Channel::SetOffset | ( | float | offset | ) |
Set the Offset property of the DDS channel.
| offset | New value for the Offset property |
| bool DDS_Channel::SetPWMValue | ( | float | pwmValue | ) |
Set the PWM_Value property of the DDS channel.
| pwmValue | New value for the PWM_Value property |
| bool DDS_Channel::SetSignalForm | ( | SignalForms_t | signalForm | ) |
Set the SignalForm property of the DDS channel.
| signalForm | New value for the SignalForm property |
| Parameter<bool> DDS_Channel::Enabled |
Is the channel enabled or not.
If enabled, the waveform is available at the output.
| Parameter<float> DDS_Channel::PWM_Value |
PWM value of the DDS channel.
This is only used if the SignalForm is set to PWM