-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
83 lines (69 loc) · 1.95 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
* This file is a part of the EpsiFlash Copyright (c) 2000-2007 Michal
* Szwaczko, WireLabs Systems contact: mikey@wirelabs.net
*/
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/io.h>
#include <sys/time.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sched.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <glib.h>
#include "chips.h"
#include "hardware.h"
GtkWidget *mainwindow;
GtkWidget *chiplabel;
GtkWidget *chipcombo;
GtkWidget *statusbar;
GtkWidget *progressbar;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *helpwindow;
GtkWidget *jumperimage;
GtkWidget *bufferwindow;
GtkWidget *bufferscrolledwindow;
GtkWidget *adrlabel;
GtkWidget *hexlabel;
GtkWidget *asciilabel;
GtkWidget *bufferclist;
GtkWidget *fileopenbutton;
GtkWidget *filesavebutton;
GtkWidget *readchipbutton;
GtkWidget *burnchipbutton;
GtkWidget *viewbufferbutton;
GtkWidget *showhelpbutton;
GtkWidget *erasechipbutton;
int chipindex;
int bufferloaded = 0;
unsigned char *buffer = NULL;
unsigned int buffersize;
unsigned short int pagesize;
char *fileinthebuffer = NULL;
void file_open(void);
void file_save(void);
void view_buffer(void);
void show_help(void);
void msg_ready(void);
void quit(void);
void read_chip(void);
void erase_chip(void);
void program_chip(void);
void chip_selected(void);
int probe_chip(void);
void show_progress(unsigned long int adr, const char *msg);
typedef struct _viewerline {
char *adres;
char *hexy;
char *ascii;
} viewerline_t;
extern struct chiptable chips[];
extern unsigned char control;
extern void generic_probe(void);