Subversion Repositories svn.mios32

Rev

Rev 1250 | Rev 1267 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1250 Rev 1264
Line 1... Line 1...
1
// $Id: scs.h 1250 2011-07-13 21:23:17Z tk $
1
// $Id: scs.h 1264 2011-07-19 21:59:04Z tk $
2
/*
2
/*
3
 * Header file for Standard Control Surface Handler
3
 * Header file for Standard Control Surface Handler
4
 *
4
 *
5
 * ==========================================================================
5
 * ==========================================================================
6
 *
6
 *
Line 108... Line 108...
108
/////////////////////////////////////////////////////////////////////////////
108
/////////////////////////////////////////////////////////////////////////////
109
// Help Macros
109
// Help Macros
110
/////////////////////////////////////////////////////////////////////////////
110
/////////////////////////////////////////////////////////////////////////////
111
111
112
#define SCS_INSTALL_ROOT(rootTable) SCS_InstallRoot((scs_menu_page_t *)rootTable, sizeof(rootTable)/sizeof(scs_menu_page_t))
112
#define SCS_INSTALL_ROOT(rootTable) SCS_InstallRoot((scs_menu_page_t *)rootTable, sizeof(rootTable)/sizeof(scs_menu_page_t))
113
#define SCS_PAGE(name, items) { name, (scs_menu_item_t *)items, sizeof(items)/sizeof(scs_menu_item_t) }
113
#define SCS_PAGE(name, items, itemLineFunct, valueLineFunct) { name, (scs_menu_item_t *)items, sizeof(items)/sizeof(scs_menu_item_t), itemLineFunct, valueLineFunct }
114
#define SCS_ITEM(name, id, maxValue, setFunct, getFunct, selectFunct, stringFunct, stringFullFunct) { name, id, maxValue, setFunct, getFunct, selectFunct, stringFunct, stringFullFunct }
114
#define SCS_ITEM(name, id, maxValue, setFunct, getFunct, selectFunct, stringFunct, stringFullFunct) { name, id, maxValue, setFunct, getFunct, selectFunct, stringFunct, stringFullFunct }
115
115
116
/////////////////////////////////////////////////////////////////////////////
116
/////////////////////////////////////////////////////////////////////////////
117
// Global Types
117
// Global Types
118
/////////////////////////////////////////////////////////////////////////////
118
/////////////////////////////////////////////////////////////////////////////
Line 135... Line 135...
135
135
136
typedef struct scs_menu_page_t {
136
typedef struct scs_menu_page_t {
137
  char             name[SCS_MENU_ITEM_WIDTH+1];
137
  char             name[SCS_MENU_ITEM_WIDTH+1];
138
  scs_menu_item_t  *page;
138
  scs_menu_item_t  *page;
139
  u8               numItems;
139
  u8               numItems;
-
 
140
  void             (*itemsLineFunct)(u8 editMode, char *line);
-
 
141
  void             (*valuesLineFunct)(u8 editMode, char *line);
140
} scs_menu_page_t;
142
} scs_menu_page_t;
141
143
142
144
143
typedef enum {
145
typedef enum {
144
  SCS_MSG_L,
146
  SCS_MSG_L,
Line 166... Line 168...
166
168
167
extern s32 SCS_ENC_MENU_NotifyChange(s32 incrementer);
169
extern s32 SCS_ENC_MENU_NotifyChange(s32 incrementer);
168
extern s32 SCS_ENC_MENU_AutoSpeedSet(u16 maxValue);
170
extern s32 SCS_ENC_MENU_AutoSpeedSet(u16 maxValue);
169
171
170
extern s32 SCS_DIN_NotifyToggle(u8 pin, u8 depressed);
172
extern s32 SCS_DIN_NotifyToggle(u8 pin, u8 depressed);
-
 
173
-
 
174
extern void SCS_StringStandardItems(u8 editMode, char *line);
-
 
175
extern void SCS_StringStandardValues(u8 editMode, char *line);
171
176
172
extern s32 SCS_InstallRoot(scs_menu_page_t *rootTable, u8 numItems);
177
extern s32 SCS_InstallRoot(scs_menu_page_t *rootTable, u8 numItems);
173
extern s32 SCS_InstallMainPageStringHook(s32 (*stringFunct)(char *line1, char *line2));
178
extern s32 SCS_InstallMainPageStringHook(s32 (*stringFunct)(char *line1, char *line2));
174
extern s32 SCS_InstallPageSelectStringHook(s32 (*stringFunct)(char *line1));
179
extern s32 SCS_InstallPageSelectStringHook(s32 (*stringFunct)(char *line1));
175
extern s32 SCS_InstallEncMainPageHook(s32 (*encFunct)(s32 incrementer));
180
extern s32 SCS_InstallEncMainPageHook(s32 (*encFunct)(s32 incrementer));