-int band;
-gboolean displayHF;
+extern int band;
+extern gboolean displayHF;
#define UK_CHANNEL_ENTRIES 11
#define OTHER_CHANNEL_ENTRIES 5
struct desc *next; // Next defined action for a controller/key with that note value (NULL for end of list)
};
-struct {
+struct cmdtable{
struct desc *desc[128]; // description for Note On/Off and ControllerChange
struct desc *pitch; // description for PitchChanges
-} MidiCommandsTable;
+};
//
// Layer-1 entry point, called once for all the MIDI devices
* MIDI events into MIDI actions in the SDR console.
*/
+#include <gtk/gtk.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "midi.h"
+struct cmdtable MidiCommandsTable;
+
void NewMidiEvent(enum MIDIevent event, int channel, int note, int val) {
struct desc *desc;
static struct timespec tp, last_wheel_tp={0,0};
long delta;
-//fprintf(stderr,"MIDI:EVENT=%d CHAN=%d NOTE=%d VAL=%d\n",event,channel,note,val);
+//g_print("%s:EVENT=%d CHAN=%d NOTE=%d VAL=%d\n",__FUNCTION__,event,channel,note,val);
if (event == MIDI_PITCH) {
desc=MidiCommandsTable.pitch;
} else {
#define modeDRM 11
#define MODES 12
-char *mode_string[MODES];
+extern char *mode_string[MODES];
#endif
-GtkWidget *sub_menu;
+extern GtkWidget *sub_menu;
extern void new_menu();
static GtkWidget* menu=NULL;
static GtkWidget* band_menu=NULL;
+struct _vfo vfo[MAX_VFOS];
+struct _mode_settings mode_settings[MODES];
static void vfo_save_bandstack() {
BANDSTACK *bandstack=bandstack_get_bandstack(vfo[0].band);
long long lo;
long long offset;
-} vfo[MAX_VFOS];
+};
+
+extern struct _vfo vfo[MAX_VFOS];
//
// Store filter and NR settings on a per-mode basis
int nr2;
int anf;
int snb;
-} mode_settings[MODES];
+};
+extern struct _mode_settings mode_settings[];
typedef struct _set_frequency {
int vfo;