Atmel Software Framework

gui.c File Reference
#include <stdarg.h>
#include "board.h"
#include "et024006dhu.h"
#include "conf_demo.h"
#include "gpio.h"
#include "gui.h"
#include "background_image.h"
#include "cycle_counter.h"
#include "dsp.h"
#include "dsp_sprintf.h"
#include "compiler.h"

Data Structures

struct  gui_box
 

Macros

#define MAX_BUFFER_HEIGHT   Max(Max(Max(Max(GUI_SOURCE1_HEIGHT, GUI_SOURCE2_HEIGHT), GUI_INPUT_HEIGHT), GUI_OUTPUT_HEIGHT), GUI_ZOOM_BOX_HEIGHT)
 
#define MAX_BUFFER_WIDTH   Max(Max(Max(Max(GUI_SOURCE1_WIDTH, GUI_SOURCE2_WIDTH), GUI_INPUT_WIDTH), GUI_OUTPUT_WIDTH), GUI_ZOOM_BOX_WIDTH)
 

Functions

static void gui_buffer_print_dsp16_bars (void *buffer, uint16_t width, uint16_t height, dsp16_t *signal, uint16_t signal_size)
 
static void gui_buffer_print_dsp16_signal (void *buffer, uint16_t width, uint16_t height, dsp16_t *signal, uint16_t signal_size)
 
static void gui_buffer_set_pixel (void *buffer, uint16_t width, uint16_t height, uint16_t x, uint16_t y)
 
void gui_change_update_fs (uint32_t time_ms)
 This function change the frequency rate of the update of the display. More...
 
void gui_clear_view (void)
 
static void gui_draw_background (uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 
uint32_t gui_get_update_fs (void)
 
void gui_init (int cpu_hz, int hsb_hz, int pba_hz, int pbb_hz)
 
static void gui_print_fft_box (int box_id, dsp16_t *signal, uint16_t signal_size)
 
static void gui_print_signal_box (int box_id, dsp16_t *signal, uint16_t signal_size)
 
void gui_set_selection (int box_id)
 Select a new box (can select only one box a time) More...
 
void gui_task (void)
 
void gui_text_print (int box_id, const char *text)
 Print text in a text box. More...
 

Variables

static struct gui_box box []
 
static uint8_t buffer [ET024006_BITMAP_WIDTH(MAX_BUFFER_WIDTH)*MAX_BUFFER_HEIGHT]
 
static int gui_cpu_hz
 
struct {
   t_cpu_time   cpu_time
 
   uint32_t   time_ms
 
gui_fs
 
char gui_text_buffer [GUI_TEXT_BUFFER_SIZE]
 
dsp16_t signal1_buf [BUFFER_LENGTH]
 
dsp16_t signal2_buf [BUFFER_LENGTH]
 
static dsp16_t signal_buffer [BUFFER_LENGTH]
 
dsp16_tsignal_in_buf
 
dsp16_t signal_in_fft [BUFFER_LENGTH]
 
dsp16_t signal_out_buf [BUFFER_LENGTH]
 
dsp16_t signal_out_fft [BUFFER_LENGTH]
 
bool signals_are_updated
 

static void gui_buffer_print_dsp16_bars ( void *  buffer,
uint16_t  width,
uint16_t  height,
dsp16_t signal,
uint16_t  signal_size 
)
static
static void gui_buffer_print_dsp16_signal ( void *  buffer,
uint16_t  width,
uint16_t  height,
dsp16_t signal,
uint16_t  signal_size 
)
static
static void gui_buffer_set_pixel ( void *  buffer,
uint16_t  width,
uint16_t  height,
uint16_t  x,
uint16_t  y 
)
inlinestatic
void gui_change_update_fs ( uint32_t  time_ms)

This function change the frequency rate of the update of the display.

References cpu_ms_2_cy(), cpu_set_timeout(), gui_cpu_hz, gui_fs, and time_ms.

Referenced by gui_init(), and state_machine_idle().

void gui_clear_view ( void  )
static void gui_draw_background ( uint16_t  x,
uint16_t  y,
uint16_t  width,
uint16_t  height 
)
static
uint32_t gui_get_update_fs ( void  )

References gui_fs.

Referenced by state_machine_idle().

void gui_init ( int  cpu_hz,
int  hsb_hz,
int  pba_hz,
int  pbb_hz 
)

struct gui_box box[]
static
Initial value:
= {
}
#define GUI_BOXES
Definition: uc3-dsplib-demo/gui.h:119
t_cpu_time cpu_time
int gui_cpu_hz
static
struct { ... } gui_fs
char gui_text_buffer[GUI_TEXT_BUFFER_SIZE]

Referenced by gui_text_print().

dsp16_t signal1_buf[BUFFER_LENGTH]

Referenced by gui_task().

dsp16_t signal2_buf[BUFFER_LENGTH]

Referenced by gui_task().

dsp16_t signal_buffer[BUFFER_LENGTH]
static

Referenced by gui_print_signal_box().

dsp16_t* signal_in_buf
dsp16_t signal_in_fft[BUFFER_LENGTH]

Referenced by dsp_process_task(), and gui_task().

dsp16_t signal_out_buf[BUFFER_LENGTH]

Referenced by dsp_process_task(), and gui_task().

dsp16_t signal_out_fft[BUFFER_LENGTH]

Referenced by dsp_process_task(), and gui_task().

bool signals_are_updated

Referenced by gui_print_signal_box().

uint32_t time_ms