waveform4 2.0.0.0
|
Waveform4 Click example. More...
Macros | |
#define | GAIN_STEP 0.05 |
#define | FREQ_STEP 100 |
Functions | |
void | waveform4_display_commands (void) |
Waveform 4 display commands function. | |
err_t | waveform4_parse_command (uint8_t command) |
Waveform 4 parse command function. | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
Variables | |
uint32_t | freq = WAVEFORM4_DEFAULT_FREQUENCY |
float | gain = WAVEFORM4_DEFAULT_GAIN |
uint8_t | channel = WAVEFORM4_CHANNEL_1 |
uint8_t | wave = WAVEFORM4_WAVE_SINE |
Waveform4 Click example.
This example demonstrates the use of Waveform 4 click board.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration which resets the registers and sets the sine wave output with default gain and default frequency for all channels. After that it displays the list of supported commands on the USB UART.
Depending on the command character received from USB UART it changes the signal frequency, gain or wave of the selected channel.
#define FREQ_STEP 100 |
#define GAIN_STEP 0.05 |
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |
void waveform4_display_commands | ( | void | ) |
Waveform 4 display commands function.
This function displays the list of supported commands on the USB UART.
err_t waveform4_parse_command | ( | uint8_t | command | ) |
Waveform 4 parse command function.
This function checks if the input command is supported and executes it.
[in] | command | : Command input, for more details refer to waveform4_display_commands function. |
0
- Success, -1
- Wrong command or command is not executed properly.uint8_t channel = WAVEFORM4_CHANNEL_1 |
uint32_t freq = WAVEFORM4_DEFAULT_FREQUENCY |
float gain = WAVEFORM4_DEFAULT_GAIN |
uint8_t wave = WAVEFORM4_WAVE_SINE |