#include <AD9834.h>
|
| AD9834 (bus::addr_t address) |
|
bool | init () |
| Initialises the chip and puts it into sleep mode.
|
|
void | write_frequency (float freq) |
| Sets the frequency of the sine / triangle output in Hz.
|
|
void | write_phase (float phase) |
| Sets the phase of the outputs synchronised to the reset pin. Possible values are mapped to [0, 2PI].
|
|
void | write_wave_form (WaveForm wave_form) |
| Sets the wave form of the function generator output.
|
|
float | get_real_frequency () const |
| Returns the actually set frequency, containing rounding errors.
|
|
float | get_real_phase () const |
| Returns the actually set phase, containing rounding errors. Possible values are [0, 2PI].
|
|
void | sleep () |
| Sets the sine / triangle output to zero. The square output will stay at high or low level.
|
|
void | awake () |
| Resumes outputs to regular operation, according to the previously specified frequencies.
|
|
| DataFunction (bus::addr_t address, const SPISettings &spiSettings) |
|
| DataFunction (bus::addr_t address, const SPISettings &spiSettings) |
|
void | begin_communication () const |
|
void | end_communication () const |
|
| Function (bus::addr_t address) |
|
Definition at line 14 of file AD9834.h.
◆ AD9834()
functions::AD9834::AD9834 |
( |
bus::addr_t | address | ) |
|
|
explicit |
◆ awake()
void functions::AD9834::awake |
( |
| ) |
|
Resumes outputs to regular operation, according to the previously specified frequencies.
Definition at line 35 of file AD9834.cpp.
◆ DataFunction()
functions::DataFunction::DataFunction |
( |
bus::addr_t | address, |
|
|
const SPISettings & | spiSettings ) |
◆ get_real_frequency()
float functions::AD9834::get_real_frequency |
( |
| ) |
const |
Returns the actually set frequency, containing rounding errors.
Definition at line 77 of file AD9834.cpp.
◆ get_real_phase()
float functions::AD9834::get_real_phase |
( |
| ) |
const |
Returns the actually set phase, containing rounding errors. Possible values are [0, 2PI].
Definition at line 81 of file AD9834.cpp.
◆ init()
bool functions::AD9834::init |
( |
| ) |
|
Initialises the chip and puts it into sleep mode.
Definition at line 12 of file AD9834.cpp.
◆ sleep()
void functions::AD9834::sleep |
( |
| ) |
|
Sets the sine / triangle output to zero. The square output will stay at high or low level.
Definition at line 28 of file AD9834.cpp.
◆ write_frequency()
void functions::AD9834::write_frequency |
( |
float | freq | ) |
|
Sets the frequency of the sine / triangle output in Hz.
Note that the square output will always operate on half of the specified frequency.
Definition at line 60 of file AD9834.cpp.
References uint32_t.
◆ write_phase()
void functions::AD9834::write_phase |
( |
float | phase | ) |
|
Sets the phase of the outputs synchronised to the reset pin. Possible values are mapped to [0, 2PI].
Definition at line 69 of file AD9834.cpp.
◆ write_wave_form()
void functions::AD9834::write_wave_form |
( |
WaveForm | wave_form | ) |
|
Sets the wave form of the function generator output.
Definition at line 42 of file AD9834.cpp.
◆ CONTROL_B28
uint16_t functions::AD9834::CONTROL_B28 = 0x2000 |
|
staticconstexpr |
◆ CONTROL_DIV2
uint16_t functions::AD9834::CONTROL_DIV2 = 0x0008 |
|
staticconstexpr |
◆ CONTROL_FSEL
uint16_t functions::AD9834::CONTROL_FSEL = 0x0800 |
|
staticconstexpr |
◆ CONTROL_HLB
uint16_t functions::AD9834::CONTROL_HLB = 0x1000 |
|
staticconstexpr |
◆ CONTROL_MODE
uint16_t functions::AD9834::CONTROL_MODE = 0x0002 |
|
staticconstexpr |
◆ CONTROL_OPBITEN
uint16_t functions::AD9834::CONTROL_OPBITEN = 0x0020 |
|
staticconstexpr |
◆ CONTROL_PINSW
uint16_t functions::AD9834::CONTROL_PINSW = 0x0200 |
|
staticconstexpr |
◆ CONTROL_PSEL
uint16_t functions::AD9834::CONTROL_PSEL = 0x0400 |
|
staticconstexpr |
◆ CONTROL_RESET
uint16_t functions::AD9834::CONTROL_RESET = 0x0100 |
|
staticconstexpr |
◆ CONTROL_SIGNPIB
uint16_t functions::AD9834::CONTROL_SIGNPIB = 0x0010 |
|
staticconstexpr |
◆ CONTROL_SLEEP1
uint16_t functions::AD9834::CONTROL_SLEEP1 = 0x0080 |
|
staticconstexpr |
◆ CONTROL_SLEEP12
uint16_t functions::AD9834::CONTROL_SLEEP12 = 0x0040 |
|
staticconstexpr |
◆ DEFAULT_SPI_SETTINGS
const SPISettings functions::AD9834::DEFAULT_SPI_SETTINGS {4'000'000, MSBFIRST, SPI_MODE2} |
|
static |
◆ ENABLE_SQUARE_WAVE
◆ ENABLE_TRIANGLE_WAVE
uint16_t functions::AD9834::ENABLE_TRIANGLE_WAVE = CONTROL_MODE |
|
staticconstexpr |
◆ MASTER_CLK
float functions::AD9834::MASTER_CLK = 75000000.0f |
|
staticconstexpr |
◆ REG_FREQ_0
uint16_t functions::AD9834::REG_FREQ_0 = 0x4000 |
|
staticconstexpr |
◆ REG_FREQ_1
uint16_t functions::AD9834::REG_FREQ_1 = 0x8000 |
|
staticconstexpr |
◆ REG_FREQ_MASK
uint16_t functions::AD9834::REG_FREQ_MASK = 0x3FFF |
|
staticconstexpr |
◆ REG_PHASE_0
uint16_t functions::AD9834::REG_PHASE_0 = 0xC000 |
|
staticconstexpr |
◆ REG_PHASE_1
uint16_t functions::AD9834::REG_PHASE_1 = 0xE000 |
|
staticconstexpr |
◆ REG_PHASE_MASK
uint16_t functions::AD9834::REG_PHASE_MASK = 0x0FFF |
|
staticconstexpr |
The documentation for this class was generated from the following files: