menu.h File Reference

menu More...

#include "main.h"

Data Structures

struct  menu_main_struct
 Main menu -- Mode. More...
struct  menu_prop_struct
 Properties. More...
struct  menu_prop_main_struct
 container for properties More...

Defines

#define MENU_ANZ_MAIN   3
 nr of main menu entries
#define MENU_PROPS_NOW   menu_props[menu_now-1]
 current properties array
#define MENU_CURRENT_PROP_NR   menu_props[menu_now-1].prop_now
 nr of the current property
#define MENU_PROP_NOW   MENU_PROPS_NOW.properties[MENU_CURRENT_PROP_NR-1]
 the current property

Functions

volatile void menu_init (void)
 initialise menu
volatile void menu_main_set (int8_t nr)
 set to menu "nr"
void menu_main_incr (void)
 next menu
void menu_main_decr (void)
 menu before
void menu_prop_set (int8_t)
 set prop in argument active
void menu_start (void)
 Handels pressed signal for button "start".
void menu_left (void)
 Handels pressed signal for button "left".
void menu_up (void)
 Handels pressed signal for button "up".
void menu_down (void)
 Handels pressed signal for button "down".
void menu_right (void)
 Handels pressed signal for button "right".

Variables

volatile int8_t menu_now
 nr of current menu point
volatile menu_main_struct menu_mains []
 array which holds one menu_main_struct for each entry
volatile menu_prop_main_struct menu_props [MENU_ANZ_MAIN]
 array holding one menu_prop_main_struct for each property


Detailed Description

menu

"Data-backend" for the menu.

03 April 2006
Sven Kreiss


Define Documentation

#define MENU_ANZ_MAIN   3
 

nr of main menu entries

#define MENU_CURRENT_PROP_NR   menu_props[menu_now-1].prop_now
 

nr of the current property

#define MENU_PROP_NOW   MENU_PROPS_NOW.properties[MENU_CURRENT_PROP_NR-1]
 

the current property

#define MENU_PROPS_NOW   menu_props[menu_now-1]
 

current properties array


Function Documentation

void menu_down void   ) 
 

Handels pressed signal for button "down".

00085                     {
00086     if(MENU_PROP_NOW.current_value > 1) MENU_PROP_NOW.current_value--;
00087     MENU_PROP_NOW.set_value(MENU_PROP_NOW.current_value);
00088 }

volatile void menu_init void   ) 
 

initialise menu

00043                     {
00044     menu_main_set(1);
00045     menu_prop_set(1);
00046 }

void menu_left void   ) 
 

Handels pressed signal for button "left".

00071                     {
00072     if(MENU_CURRENT_PROP_NR > 1) MENU_PROPS_NOW.prop_now--;
00073     else MENU_PROPS_NOW.prop_now = MENU_PROPS_NOW.nr_props;
00074 }

void menu_main_decr void   ) 
 

menu before

00058                          {
00059     if(menu_now > 1)    menu_main_set(menu_now - 1);
00060     else                menu_main_set(MENU_ANZ_MAIN);
00061 }

void menu_main_incr void   ) 
 

next menu

00053                          {
00054     if(menu_now < MENU_ANZ_MAIN)    menu_main_set(menu_now + 1);
00055     else                            menu_main_set(1);
00056 }

volatile void menu_main_set int8_t  nr  ) 
 

set to menu "nr"

00049                              {
00050     if(nr <= MENU_ANZ_MAIN) menu_now = nr;
00051 }

void menu_prop_set int8_t   ) 
 

set prop in argument active

00063                              {
00064     if(nr <= MENU_PROPS_NOW.nr_props) MENU_PROPS_NOW.prop_now = nr;
00065 }

void menu_right void   ) 
 

Handels pressed signal for button "right".

00075                      {
00076     if(MENU_CURRENT_PROP_NR < MENU_PROPS_NOW.nr_props) MENU_PROPS_NOW.prop_now++;
00077     else MENU_PROPS_NOW.prop_now = 1;
00078 }

void menu_start void   ) 
 

Handels pressed signal for button "start".

00069 {}

void menu_up void   ) 
 

Handels pressed signal for button "up".

00080                   {
00081     if(MENU_PROP_NOW.current_value < MENU_PROP_NOW.nr_values)
00082         MENU_PROP_NOW.current_value++;
00083     MENU_PROP_NOW.set_value(MENU_PROP_NOW.current_value);
00084 }


Variable Documentation

volatile menu_main_struct menu_mains[]
 

array which holds one menu_main_struct for each entry

Initialise the modes (or main menu entries).

Todo:
changes needed: -FFT, +Logic Analyzer, +multimeter function (U, I, R)

volatile int8_t menu_now
 

nr of current menu point

volatile menu_prop_main_struct menu_props[MENU_ANZ_MAIN]
 

array holding one menu_prop_main_struct for each property

Initialises all properties


Generated on Fri Aug 11 21:47:32 2006 for OpenOsci by  doxygen 1.4.6