dso_appendix.pdf
(
204 KB
)
Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Digital Storage
Oscilloscope
Appendix
Thomas Grocutt
April 2000
Contents
8) Appendix
1
8.1) DSO Control Software
1
8.1.1) Main.c
1
8.1.2) Main.h
3
8.1.3) GUI.c
4
8.1.4) Gui.h
33
8.1.5) Plot_Data.c
35
8.1.6) Plot_Data.h
56
8.1.7) Error.c
58
8.1.8) Error.h
62
8.1.9) File_IO.c
63
8.1.10) File_IO.h
67
8.1.11) Numeric.c
68
8.1.12) Numeric.h
70
8.1.13) DSO_IO.c
71
8.1.14) DSO_IO.h
84
8.1.15) P_Port_IO.c
88
8.1.16) P_Port_IO.h
92
8.1.17) Define.h
93
8.1.18) Resource.h
94
8.2) Pattern Generation Software
96
8.2.1) Pat.c
96
8.2.2) Reset.c
97
8.3) Altera Block Diagrams
98
8.3.1) Functional Overview
98
8.3.2) Paralell Port Controler
99
8.3.3) Trigger Unit
100
8.3.4) Clock Controler
100
8.3.5) FIFO Controler
101
8.3.6) Pre Trigger Counter
101
i
8) Appendix
8.1) DSO Control Software
8.1.1) Main.c
/* DSO Control Software */
/* Version 1.2
*/
/*
*/
/* By Thomas Grocutt
*/
/* local define statments */
#define FILE_MAIN
/* local include statments */
#include "main.h"
#include "gui.h"
#include "error.h"
#include "dso_io.h"
#include "p_port_io.h"
#include "file_io.h"
#include "plot_data.h"
#include <stdio.h>
#include <stdlib.h>
/* Global veraibles
*/
HINSTANCE instance_handler;
struct prefs_struct prefs;
1
/* Initial function, this is the win32 entry point */
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
/* store hInstance globaly
*/
instance_handler=hInstance;
/* set the port address
*/
p_port_set_address( DEFAULT_P_PORT, 1 );
/* setup the def scope settings
*/
clear_dso_data();
scope_data.scope_mode=0;
scope_data.pre_trigger=0;
scope_data.clock_div=0;
scope_data.trig_sel=0;
scope_data.trig_value=0;
scope_data.trig_falling=FALSE;
/* setup def plot settings
*/
prefs.zoom_pan_mode=TRUE;
prefs.x_axis_time=FALSE;
prefs.show_pre_trig=TRUE;
prefs.show_trig_level=TRUE;
/* show the gui */
show_gui( nCmdShow );
quit(0);
}
/* quit program with clean up */
void quit( int ret_code)
{
PostQuitMessage( 0 );
fcloseall();
exit( ret_code );
}
2
8.1.2) Main.h
/* check if we have included this header files before */
#ifndef FILE_MAIN_HEADER
/* define FILE_MAIN_HEADER so we dont include this file again */
#define FILE_MAIN_HEADER
/* include statments */
#include <windows.h>
/* prefs struct define */
struct prefs_struct
{
BOOL zoom_pan_mode;
BOOL x_axis_time;
BOOL show_pre_trig;
BOOL show_trig_level;
};
/* Check whether if this file is being used for main.c or another file */
#ifdef FILE_MAIN
/* File used for main.c */
#define FILE_MAIN_EXTERN
#else
/* File used for other source file */
#define FILE_MAIN_EXTERN extern
/* extern referance to global verables */
extern HINSTANCE instance_handler;
extern struct prefs_struct prefs;
#endif
/* external and internal function declirations */
FILE_MAIN_EXTERN void quit( int ret_code);
#endif
3
Plik z chomika:
ElKoziRRo
Inne pliki z tego folderu:
AVT5127.pdf
(638 KB)
AVT5300.pdf
(1111 KB)
AV9107C.pdf
(509 KB)
Eagle-21.03.2008(1).pdf
(76 KB)
AVT135.pdf
(527 KB)
Inne foldery tego chomika:
- bajki słuchowiska
Pliki dostępne do 01.06.2025
Pliki dostępne do 19.01.2025
Pliki dostępne do 21.01.2024
!! AutoMapa 6.19 Europa 1602 EU FINAL (INSTALATOR CRACKED)
Zgłoś jeśli
naruszono regulamin