Atmel Software Framework

demo.c File Reference
#include "dsp_process.h"
#include "gui.h"
#include "controller.h"
#include "board.h"
#include "twim.h"
#include "pm.h"
#include "tpa6130.h"
#include "gpio.h"
#include "print_funcs.h"
#include "flashc.h"
#include "conf_demo.h"

Macros

#define TEXT_FILTER   "Filters\nFUNC 1 - 3:\n Select filter"
 
#define TEXT_FUNC1   "FUNC1"
 
#define TEXT_FUNC2   "FUNC2"
 
#define TEXT_FUNC3   "FUNC3"
 
#define TEXT_FUNC_NOT_IMPLEMENTED   "Function not\nimplemented"
 
#define TEXT_IDLE   "FUNC1 - Frame/s\nFUNC2 - Volume\nWHEEL - Select box"
 
#define TEXT_INPUT   "Input signal\nFUNC1 - Time/FFT\nFUNC3 - Zoom"
 
#define TEXT_OUTPUT   "Output signal\nFUNC1 - Time/FFT\nFUNC3 - Zoom"
 
#define TEXT_SOURCE1   "Source1\nFUNC1 - Amplitude\nFUNC2 - Frequency\nFUNC3 - Zoom"
 
#define TEXT_SOURCE2   "Source2\nFUNC1 - Amplitude\nFUNC2 - Frequency\nFUNC3 - Zoom"
 
#define TEXT_WHEEL   "(Use the WHEEL)"
 

Enumerations

enum  state_function {
  STATE_FCT_IDLE,
  STATE_FCT_FUNCTION1,
  STATE_FCT_FUNCTION2,
  STATE_FCT_FUNCTION3,
  STATE_FCT_ZOOM
}
 
enum  state_master {
  STATE_IDLE,
  STATE_SOURCE1,
  STATE_SOURCE2,
  STATE_FILTER,
  STATE_INPUT,
  STATE_OUTPUT
}
 

Functions

void init_sys_clocks (void)
 Initializes the MCU system clocks. More...
 
int main (void)
 
static bool state_machine_filter (enum state_function *state)
 
static bool state_machine_idle (enum state_function *state)
 
static bool state_machine_signal (enum state_master id, enum state_function *state)
 
static bool state_machine_source (int source_id, enum state_function *state)
 
static void state_machine_task (void)
 
static void switch_state (enum state_master state)
 
static void twi_init (void)
 

Variables

volatile bool input_fft_view = false
 
static bool new_state_fct = false
 
volatile bool output_fft_view = false
 
static enum state_master state = STATE_IDLE
 
static enum state_function state_fct = STATE_FCT_IDLE
 
volatile bool zoom_view = false
 
volatile int zoom_view_id
 

#define TEXT_FILTER   "Filters\nFUNC 1 - 3:\n Select filter"

Referenced by state_machine_filter().

#define TEXT_FUNC1   "FUNC1"
#define TEXT_FUNC2   "FUNC2"
#define TEXT_FUNC3   "FUNC3"
#define TEXT_FUNC_NOT_IMPLEMENTED   "Function not\nimplemented"
#define TEXT_IDLE   "FUNC1 - Frame/s\nFUNC2 - Volume\nWHEEL - Select box"

Referenced by main(), and state_machine_idle().

#define TEXT_INPUT   "Input signal\nFUNC1 - Time/FFT\nFUNC3 - Zoom"

Referenced by state_machine_signal().

#define TEXT_OUTPUT   "Output signal\nFUNC1 - Time/FFT\nFUNC3 - Zoom"

Referenced by state_machine_signal().

#define TEXT_SOURCE1   "Source1\nFUNC1 - Amplitude\nFUNC2 - Frequency\nFUNC3 - Zoom"

Referenced by state_machine_source().

#define TEXT_SOURCE2   "Source2\nFUNC1 - Amplitude\nFUNC2 - Frequency\nFUNC3 - Zoom"

Referenced by state_machine_source().

#define TEXT_WHEEL   "(Use the WHEEL)"

Enumerator
STATE_FCT_IDLE 
STATE_FCT_FUNCTION1 
STATE_FCT_FUNCTION2 
STATE_FCT_FUNCTION3 
STATE_FCT_ZOOM 
Enumerator
STATE_IDLE 
STATE_SOURCE1 
STATE_SOURCE2 
STATE_FILTER 
STATE_INPUT 
STATE_OUTPUT 

static void switch_state ( enum state_master  state)
static
static void twi_init ( void  )
static

volatile bool input_fft_view = false

Referenced by gui_task(), and state_machine_signal().

volatile bool output_fft_view = false

Referenced by gui_task(), and state_machine_signal().

enum state_master state = STATE_IDLE
static
enum state_function state_fct = STATE_FCT_IDLE
static

Referenced by state_machine_task(), and switch_state().