OpenCBM
libtrans.h
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version
5  * 2 of the License, or (at your option) any later version.
6  *
7  * Copyright 2005 Spiro Trikaliotis
8 */
9 
10 #ifndef LIBTRANS_H
11 #define LIBTRANS_H
12 
13 #include "opencbm.h"
14 #include <stdio.h>
15 
16 #define LIBOCT_STATE_DEBUG /* enable state logging and debugging */
17 
18 #ifdef __cplusplus
19 extern "C" { /* allow linkage to C++ programs */
20 #endif
21 
22 typedef
23 enum opencbm_transfer_e
24 {
25  opencbm_transfer_serial1,
26  opencbm_transfer_serial2,
27  opencbm_transfer_parallel
28 } opencbm_transfer_t;
29 
30 int
31 libopencbmtransfer_set_transfer(opencbm_transfer_t type);
32 
33 int
34 libopencbmtransfer_install(CBM_FILE HandleDevice, unsigned char DeviceAddress);
35 
36 int
37 libopencbmtransfer_execute_command(CBM_FILE HandleDevice, unsigned char DeviceAddress,
38  unsigned int ExecutionAddress);
39 
40 int
41 libopencbmtransfer_read_mem(CBM_FILE HandleDevice, unsigned char DeviceAddress,
42  unsigned char Buffer[], unsigned int MemoryAddress, unsigned int Length);
43 
44 int
45 libopencbmtransfer_write_mem(CBM_FILE HandleDevice, unsigned char DeviceAddress,
46  unsigned char Buffer[], unsigned int MemoryAddress, unsigned int Length);
47 
48 int
49 libopencbmtransfer_remove(CBM_FILE HandleDevice, unsigned char DeviceAddress);
50 
51 #ifdef LIBOCT_STATE_DEBUG
52 extern void libopencbmtransfer_printStateDebugCounters(FILE *channel);
53 #endif
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 #endif /* #ifndef LIBTRANS_H */
#define CBM_FILE
Definition: opencbm.h:87
DLL interface for accessing the driver.