waveform3 2.0.0.0
|
API for configuring and manipulating Waveform 3 Click driver. More...
Topics | |
Waveform 3 Registers List | |
List of registers of Waveform 3 Click driver. | |
Waveform 3 Mode Settings | |
Settings for modes of Waveform 3 Click driver. | |
Waveform 3 FREQ Settings | |
Selection for frequency channel of Waveform 3 Click driver. | |
Waveform 3 PHASE Settings | |
Selection for phase shift channel of Waveform 3 Click driver. | |
Waveform 3 default Settings | |
Default settings on reset, located in default_cfg function. | |
Waveform 3 MikroBUS Map | |
MikroBUS pin mapping of Waveform 3 Click driver. | |
Functions | |
void | waveform3_cfg_setup (waveform3_cfg_t *cfg) |
Waveform 3 configuration object setup function. | |
err_t | waveform3_init (waveform3_t *ctx, waveform3_cfg_t *cfg) |
Waveform 3 initialization function. | |
void | waveform3_default_cfg (waveform3_t *ctx) |
Waveform 3 default configuration function. | |
void | waveform3_write_register (waveform3_t *ctx, uint16_t data_in) |
Waveform 3 write register function. | |
void | waveform3_reset (waveform3_t *ctx) |
Waveform 3 reset function. | |
uint32_t | waveform3_set_freq (waveform3_t *ctx, uint32_t frequency, uint8_t freq_reg) |
Waveform 3 set frequency function. | |
uint16_t | waveform3_set_phase (waveform3_t *ctx, float phase, uint8_t phase_reg) |
Waveform 3 set phase function. | |
void | waveform3_set_mode (waveform3_t *ctx, uint8_t mode, uint8_t freq_reg, uint8_t phase_reg) |
Waveform 3 set mode function. | |
API for configuring and manipulating Waveform 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void waveform3_cfg_setup | ( | waveform3_cfg_t * | cfg | ) |
Waveform 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See waveform3_cfg_t object definition for detailed explanation. |
void waveform3_default_cfg | ( | waveform3_t * | ctx | ) |
Waveform 3 default configuration function.
This function executes a default configuration of Waveform 3 click board.
[in] | ctx | : Click context object. See waveform3_t object definition for detailed explanation. |
err_t waveform3_init | ( | waveform3_t * | ctx, |
waveform3_cfg_t * | cfg ) |
Waveform 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See waveform3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See waveform3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void waveform3_reset | ( | waveform3_t * | ctx | ) |
Waveform 3 reset function.
This function performs simple reset of AD9837 waveform generator.
[in] | ctx | : Click context object. See waveform3_t object definition for detailed explanation. |
uint32_t waveform3_set_freq | ( | waveform3_t * | ctx, |
uint32_t | frequency, | ||
uint8_t | freq_reg ) |
Waveform 3 set frequency function.
This function sets desired frequency ( in Hz ) on desired freq channel.
[in] | ctx | : Click context object. See waveform3_t object definition for detailed explanation. |
[in] | frequency | : Frequency value. |
[in] | freq_reg | : FREQx channel. |
void waveform3_set_mode | ( | waveform3_t * | ctx, |
uint8_t | mode, | ||
uint8_t | freq_reg, | ||
uint8_t | phase_reg ) |
Waveform 3 set mode function.
This function sets output mode, freq and phase channels of AD9837 waveform generator.
[in] | ctx | : Click context object. See waveform3_t object definition for detailed explanation. |
[in] | mode | : Wave output modes. |
[in] | freq_reg | : FREQx channel. |
[in] | phase_reg | : PHASEx channel. |
uint16_t waveform3_set_phase | ( | waveform3_t * | ctx, |
float | phase, | ||
uint8_t | phase_reg ) |
Waveform 3 set phase function.
This function sets desired phase shift ( in degrees ) on desired phase channel.
[in] | ctx | : Click context object. See waveform3_t object definition for detailed explanation. |
[in] | phase | : Phase shift value. |
[in] | phase_reg | : PHASEx channel. |
void waveform3_write_register | ( | waveform3_t * | ctx, |
uint16_t | data_in ) |
Waveform 3 write register function.
This function is used for word transfer as a core of communication.
[in] | ctx | : Click context object. See waveform3_t object definition for detailed explanation. |
[in] | data_in | : Word data. |