diff options
author | Attila Veghelyi <aveghelyi@dension.com> | 2023-07-03 09:05:43 +0200 |
---|---|---|
committer | Attila Veghelyi <works@veghelyiattila.hu> | 2023-07-23 19:41:01 +0200 |
commit | 3677ef6a3d3f01f11d9b1511a0383ff166a068fa (patch) | |
tree | 970c731fdb843eaeefd4ec44ea0d6b2484a33707 /common_op.h | |
parent | 925d0670c45e1100e412070fa0ce2405604f219a (diff) | |
download | OpenProgrammer-3677ef6a3d3f01f11d9b1511a0383ff166a068fa.tar.gz OpenProgrammer-3677ef6a3d3f01f11d9b1511a0383ff166a068fa.zip |
Unify 'common.h'
Diffstat (limited to 'common_op.h')
-rw-r--r-- | common_op.h | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/common_op.h b/common_op.h deleted file mode 100644 index c1f688a..0000000 --- a/common_op.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef _COMMON_DECLARATIONS -#define _COMMON_DECLARATIONS -//#define DEBUG -#define _APPNAME "OP" -#define _CMD - -#if !defined _WIN32 && !defined __CYGWIN__ -//linux: - #include <sys/ioctl.h> - #include <sys/types.h> - #include <sys/stat.h> - #include <asm/types.h> - #include <fcntl.h> - #include <linux/hiddev.h> - #include <linux/hidraw.h> - #include <linux/input.h> - #include <sys/timeb.h> - #include <stdint.h> - #include <errno.h> -#else -//windows - #include <windows.h> - #include <setupapi.h> - #include <hidusage.h> - #include <hidpi.h> - #include <math.h> - #include <sys/timeb.h> - #include <wchar.h> -#endif - -#include <unistd.h> -#include <stdlib.h> -#include <stdio.h> -#include <time.h> -#include <ctype.h> -#include <getopt.h> -#include <string.h> -#include "strings.h" -#include "instructions.h" - -typedef unsigned long DWORD; -typedef unsigned short WORD; -typedef unsigned char BYTE; - -//to use the same code of windows version -#define PrintMessage printf -#define PrintMessage1 printf -#define PrintMessage2 printf -#define PrintMessage3 printf -#define PrintMessage4 printf -#define PrintStatus(s,p1,p2) printf("\b\b\b\b%3d%%",p1); fflush(stdout); -#define PrintStatusSetup() printf(" "); -#define PrintStatusEnd() printf("\b\b\b\b"); -#define PrintStatusClear() //only for GUI -#define COL 16 -//Version defined in makefile -#if !defined VERSION - #define VERSION "unknown" -#endif -#define G (12.0/34*1024/5) //=72,2823529412 -#define LOCK 1 -#define FUSE 2 -#define FUSE_H 4 -#define FUSE_X 8 -#define CAL 16 -#define SLOW 256 - -#if !defined _WIN32 && !defined __CYGWIN__ //Linux - #define SYSNAME "Linux" - #define DIMBUF 64 - DWORD GetTickCount(); - extern unsigned char bufferU[128],bufferI[128]; -#else //Windows - #define SYSNAME "Windows" - #define DIMBUF 64 - extern unsigned char bufferU0[128],bufferI0[128]; - extern unsigned char *bufferU,*bufferI; - extern DWORD NumberOfBytesRead,BytesWritten; - extern ULONG Result; - extern HANDLE WriteHandle,ReadHandle; - extern OVERLAPPED HIDOverlapped; - extern HANDLE hEventObject; -#endif - -extern char str[4096]; -extern int saveLog; -extern char** strings; -extern int fd; -extern int saveLog,programID,MinDly,load_osccal,load_BKosccal; -extern int use_osccal,use_BKosccal; -extern int load_calibword,max_err; -extern int AVRlock,AVRfuse,AVRfuse_h,AVRfuse_x; -extern int ICDenable,ICDaddr; -extern int FWVersion,HwID; -extern FILE* logfile; -extern char LogFileName[512]; -extern char loadfile[512],savefile[512]; -extern WORD *memCODE_W; -extern int size,sizeW,sizeEE,sizeCONFIG,sizeUSERID; -extern unsigned char *memCODE,*memEE,memID[64],memCONFIG[48],memUSERID[8]; -extern double hvreg; -extern int RWstop; - -int StartHVReg(double V); -void msDelay(double delay); -void DisplayEE(); -void PrintMessageI2C(const char *msg); -int CheckV33Regulator(void); -void OpenLogFile(void); -void WriteLogIO(); -void CloseLogFile(); -unsigned int htoi(const char *hex, int length); -void PacketIO(double delay); -#endif |