OpenCBM
opencbm-plugin.h
Go to the documentation of this file.
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 2008-2009, 2011 Spiro Trikaliotis
8  * Copyright 2011 Wolfgang Moser
9  */
10 
19 #ifndef OPENCBM_PLUGIN_H
20 #define OPENCBM_PLUGIN_H
21 
22 #include "opencbm.h"
23 
28 typedef int CBMAPIDECL opencbm_plugin_init_t(void);
29 
34 typedef void CBMAPIDECL opencbm_plugin_uninit_t(void);
35 
42 typedef const char * CBMAPIDECL opencbm_plugin_get_driver_name_t(const char * const Port);
43 
52 typedef int CBMAPIDECL opencbm_plugin_driver_open_t(CBM_FILE *HandleDevice, const char * const Port);
53 
59 
64 typedef void CBMAPIDECL opencbm_plugin_lock_t(CBM_FILE HandleDevice);
65 
70 typedef void CBMAPIDECL opencbm_plugin_unlock_t(CBM_FILE HandleDevice);
71 
82 typedef int CBMAPIDECL opencbm_plugin_raw_write_t(CBM_FILE HandleDevice, const void *Buffer, size_t Count);
83 
94 typedef int CBMAPIDECL opencbm_plugin_raw_read_t(CBM_FILE HandleDevice, void *Buffer, size_t Count);
95 
106 typedef int CBMAPIDECL opencbm_plugin_open_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress);
107 
118 typedef int CBMAPIDECL opencbm_plugin_close_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress);
119 
130 typedef int CBMAPIDECL opencbm_plugin_listen_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress);
131 
142 typedef int CBMAPIDECL opencbm_plugin_talk_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress);
143 
151 
158 typedef int CBMAPIDECL opencbm_plugin_untalk_t(CBM_FILE HandleDevice);
159 
166 typedef int CBMAPIDECL opencbm_plugin_get_eoi_t(CBM_FILE HandleDevice);
167 
175 
182 typedef int CBMAPIDECL opencbm_plugin_reset_t(CBM_FILE HandleDevice);
183 
190 typedef unsigned char CBMAPIDECL opencbm_plugin_pp_read_t(CBM_FILE HandleDevice);
191 
198 typedef void CBMAPIDECL opencbm_plugin_pp_write_t(CBM_FILE HandleDevice, unsigned char Byte);
199 
207 
215 typedef void CBMAPIDECL opencbm_plugin_iec_set_t(CBM_FILE HandleDevice, int Line);
216 
223 typedef void CBMAPIDECL opencbm_plugin_iec_release_t(CBM_FILE HandleDevice, int Line);
224 
231 typedef void CBMAPIDECL opencbm_plugin_iec_setrelease_t(CBM_FILE HandleDevice, int Set, int Release);
232 
243 typedef int CBMAPIDECL opencbm_plugin_iec_wait_t(CBM_FILE HandleDevice, int Line, int State);
244 
251 typedef unsigned char CBMAPIDECL opencbm_plugin_parallel_burst_read_t(CBM_FILE HandleDevice);
252 
259 typedef void CBMAPIDECL opencbm_plugin_parallel_burst_write_t(CBM_FILE HandleDevice, unsigned char Value);
260 
271 typedef int CBMAPIDECL opencbm_plugin_parallel_burst_read_n_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length);
272 
283 typedef int CBMAPIDECL opencbm_plugin_parallel_burst_write_n_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length);
284 
295 typedef int CBMAPIDECL opencbm_plugin_parallel_burst_read_track_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length);
296 
307 typedef int CBMAPIDECL opencbm_plugin_parallel_burst_read_track_var_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length);
308 
319 typedef int CBMAPIDECL opencbm_plugin_parallel_burst_write_track_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length);
320 
331 typedef int CBMAPIDECL opencbm_plugin_tap_prepare_capture_t(CBM_FILE HandleDevice, int *Status);
332 typedef int CBMAPIDECL opencbm_plugin_tap_prepare_write_t(CBM_FILE HandleDevice, int *Status);
333 typedef int CBMAPIDECL opencbm_plugin_tap_get_sense_t(CBM_FILE HandleDevice, int *Status);
334 typedef int CBMAPIDECL opencbm_plugin_tap_wait_for_stop_sense_t(CBM_FILE HandleDevice, int *Status);
335 typedef int CBMAPIDECL opencbm_plugin_tap_wait_for_play_sense_t(CBM_FILE HandleDevice, int *Status);
336 typedef int CBMAPIDECL opencbm_plugin_tap_motor_on_t(CBM_FILE HandleDevice, int *Status);
337 typedef int CBMAPIDECL opencbm_plugin_tap_motor_off_t(CBM_FILE HandleDevice, int *Status);
338 typedef int CBMAPIDECL opencbm_plugin_tap_start_capture_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Buffer_Length, int *Status, int *BytesRead);
339 typedef int CBMAPIDECL opencbm_plugin_tap_start_write_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length, int *Status, int *BytesWritten);
340 typedef int CBMAPIDECL opencbm_plugin_tap_get_ver_t(CBM_FILE HandleDevice, int *Status);
341 typedef int CBMAPIDECL opencbm_plugin_tap_download_config_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Buffer_Length, int *Status, int *BytesRead);
342 typedef int CBMAPIDECL opencbm_plugin_tap_upload_config_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length, int *Status, int *BytesWritten);
343 typedef int CBMAPIDECL opencbm_plugin_tap_break_t(CBM_FILE HandleDevice);
344 
360 typedef int CBMAPIDECL opencbm_plugin_s1_read_n_t (CBM_FILE HandleDevice, unsigned char *data, unsigned int size);
361 
377 typedef int CBMAPIDECL opencbm_plugin_s1_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size);
378 
394 typedef int CBMAPIDECL opencbm_plugin_s2_read_n_t (CBM_FILE HandleDevice, unsigned char *data, unsigned int size);
395 
411 typedef int CBMAPIDECL opencbm_plugin_s2_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size);
412 
428 typedef int CBMAPIDECL opencbm_plugin_s3_read_n_t (CBM_FILE HandleDevice, unsigned char *data, unsigned int size);
429 
445 typedef int CBMAPIDECL opencbm_plugin_s3_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size);
446 
462 typedef int CBMAPIDECL opencbm_plugin_pp_dc_read_n_t (CBM_FILE HandleDevice, unsigned char *data, unsigned int size);
463 
479 typedef int CBMAPIDECL opencbm_plugin_pp_dc_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size);
480 
496 typedef int CBMAPIDECL opencbm_plugin_pp_cc_read_n_t (CBM_FILE HandleDevice, unsigned char *data, unsigned int size);
497 
513 typedef int CBMAPIDECL opencbm_plugin_pp_cc_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size);
514 
515 
523 
532 typedef int CBMAPIDECL opencbm_plugin_iec_dbg_write_t(CBM_FILE HandleDevice, unsigned char Value);
533 
534 
542 typedef
543 struct opencbm_plugin_s {
589  opencbm_plugin_tap_prepare_write_t * opencbm_plugin_tap_prepare_write;
590  opencbm_plugin_tap_get_sense_t * opencbm_plugin_tap_get_sense;
591  opencbm_plugin_tap_wait_for_stop_sense_t * opencbm_plugin_tap_wait_for_stop_sense;
592  opencbm_plugin_tap_wait_for_play_sense_t * opencbm_plugin_tap_wait_for_play_sense;
593  opencbm_plugin_tap_motor_on_t * opencbm_plugin_tap_motor_on;
594  opencbm_plugin_tap_motor_off_t * opencbm_plugin_tap_motor_off;
595  opencbm_plugin_tap_start_capture_t * opencbm_plugin_tap_start_capture;
596  opencbm_plugin_tap_start_write_t * opencbm_plugin_tap_start_write;
597  opencbm_plugin_tap_get_ver_t * opencbm_plugin_tap_get_ver;
598  opencbm_plugin_tap_download_config_t * opencbm_plugin_tap_download_config;
599  opencbm_plugin_tap_upload_config_t * opencbm_plugin_tap_upload_config;
600  opencbm_plugin_tap_break_t * opencbm_plugin_tap_break;
603 
604 #endif // #ifndef OPENCBM_PLUGIN_H
int CBMAPIDECL opencbm_plugin_s3_read_n_t(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
read a block of data from the OpenCBM backend with protocol parallel/d64copy
opencbm_plugin_parallel_burst_read_track_t * opencbm_plugin_srq_burst_read_track
opencbm_plugin_tap_break_t * opencbm_plugin_tap_break
int CBMAPIDECL opencbm_plugin_pp_dc_read_n_t(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
read a block of data from the OpenCBM backend with protocol parallel/d64copy
opencbm_plugin_tap_get_ver_t * opencbm_plugin_tap_get_ver
opencbm_plugin_parallel_burst_read_n_t * opencbm_plugin_srq_burst_read_n
int CBMAPIDECL opencbm_plugin_pp_cc_read_n_t(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
read a block of data from the OpenCBM backend with protocol parallel/cbmcopy
int CBMAPIDECL opencbm_plugin_raw_read_t(CBM_FILE HandleDevice, void *Buffer, size_t Count)
@@@
int CBMAPIDECL opencbm_plugin_iec_poll_t(CBM_FILE HandleDevice)
@@@
opencbm_plugin_tap_get_sense_t * opencbm_plugin_tap_get_sense
holds all callbacks of the plugin
int CBMAPIDECL opencbm_plugin_raw_write_t(CBM_FILE HandleDevice, const void *Buffer, size_t Count)
@@@
void CBMAPIDECL opencbm_plugin_driver_close_t(CBM_FILE HandleDevice)
@@@
opencbm_plugin_parallel_burst_read_track_var_t * opencbm_plugin_parallel_burst_read_track_var
int CBMAPIDECL opencbm_plugin_listen_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
@@@
opencbm_plugin_iec_wait_t * opencbm_plugin_iec_wait
#define CBMAPIDECL
Definition: opencbm.h:85
int CBMAPIDECL opencbm_plugin_untalk_t(CBM_FILE HandleDevice)
@@@
opencbm_plugin_iec_dbg_read_t * opencbm_plugin_iec_dbg_read
opencbm_plugin_lock_t * opencbm_plugin_lock
unsigned char CBMAPIDECL opencbm_plugin_pp_read_t(CBM_FILE HandleDevice)
@@@
opencbm_plugin_iec_dbg_write_t * opencbm_plugin_iec_dbg_write
void CBMAPIDECL opencbm_plugin_pp_write_t(CBM_FILE HandleDevice, unsigned char Byte)
@@@
int CBMAPIDECL opencbm_plugin_s1_read_n_t(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
read a block of data from the OpenCBM backend with protocol serial-1
int CBMAPIDECL opencbm_plugin_iec_dbg_read_t(CBM_FILE HandleDevice)
@@@
void CBMAPIDECL opencbm_plugin_iec_release_t(CBM_FILE HandleDevice, int Line)
@@@
opencbm_plugin_iec_release_t * opencbm_plugin_iec_release
opencbm_plugin_parallel_burst_write_t * opencbm_plugin_srq_burst_write
opencbm_plugin_untalk_t * opencbm_plugin_untalk
int CBMAPIDECL opencbm_plugin_parallel_burst_read_track_var_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
@@@
void CBMAPIDECL opencbm_plugin_iec_set_t(CBM_FILE HandleDevice, int Line)
@@@
opencbm_plugin_tap_start_write_t * opencbm_plugin_tap_start_write
int CBMAPIDECL opencbm_plugin_talk_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
@@@
opencbm_plugin_clear_eoi_t * opencbm_plugin_clear_eoi
opencbm_plugin_pp_read_t * opencbm_plugin_pp_read
const char *CBMAPIDECL opencbm_plugin_get_driver_name_t(const char *const Port)
@@@
opencbm_plugin_iec_set_t * opencbm_plugin_iec_set
opencbm_plugin_uninit_t * opencbm_plugin_uninit
int CBMAPIDECL opencbm_plugin_pp_cc_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
write a block of data to the OpenCBM backend with protocol parallel/cbmcopy
opencbm_plugin_parallel_burst_read_track_t * opencbm_plugin_parallel_burst_read_track
opencbm_plugin_tap_motor_off_t * opencbm_plugin_tap_motor_off
int CBMAPIDECL opencbm_plugin_parallel_burst_write_n_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
@@@
opencbm_plugin_iec_setrelease_t * opencbm_plugin_iec_setrelease
int CBMAPIDECL opencbm_plugin_driver_open_t(CBM_FILE *HandleDevice, const char *const Port)
@@@
opencbm_plugin_parallel_burst_write_track_t * opencbm_plugin_parallel_burst_write_track
int CBMAPIDECL opencbm_plugin_close_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
@@@
opencbm_plugin_parallel_burst_read_t * opencbm_plugin_srq_burst_read
opencbm_plugin_tap_wait_for_stop_sense_t * opencbm_plugin_tap_wait_for_stop_sense
opencbm_plugin_talk_t * opencbm_plugin_talk
int CBMAPIDECL opencbm_plugin_open_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
@@@
opencbm_plugin_unlock_t * opencbm_plugin_unlock
int CBMAPIDECL opencbm_plugin_unlisten_t(CBM_FILE HandleDevice)
@@@
int CBMAPIDECL opencbm_plugin_parallel_burst_write_track_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
@@@
int CBMAPIDECL opencbm_plugin_iec_wait_t(CBM_FILE HandleDevice, int Line, int State)
@@@
void CBMAPIDECL opencbm_plugin_lock_t(CBM_FILE HandleDevice)
@@@
#define CBM_FILE
Definition: opencbm.h:87
opencbm_plugin_init_t * opencbm_plugin_init
int CBMAPIDECL opencbm_plugin_iec_dbg_write_t(CBM_FILE HandleDevice, unsigned char Value)
@@@
int CBMAPIDECL opencbm_plugin_s2_read_n_t(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
read a block of data from the OpenCBM backend with protocol serial-2
opencbm_plugin_parallel_burst_write_t * opencbm_plugin_parallel_burst_write
opencbm_plugin_raw_read_t * opencbm_plugin_raw_read
void CBMAPIDECL opencbm_plugin_unlock_t(CBM_FILE HandleDevice)
@@@
int CBMAPIDECL opencbm_plugin_init_t(void)
@@@
void CBMAPIDECL opencbm_plugin_iec_setrelease_t(CBM_FILE HandleDevice, int Set, int Release)
@@@
opencbm_plugin_tap_upload_config_t * opencbm_plugin_tap_upload_config
opencbm_plugin_get_eoi_t * opencbm_plugin_get_eoi
opencbm_plugin_tap_motor_on_t * opencbm_plugin_tap_motor_on
opencbm_plugin_tap_wait_for_play_sense_t * opencbm_plugin_tap_wait_for_play_sense
opencbm_plugin_driver_close_t * opencbm_plugin_driver_close
opencbm_plugin_tap_download_config_t * opencbm_plugin_tap_download_config
int CBMAPIDECL opencbm_plugin_clear_eoi_t(CBM_FILE HandleDevice)
@@@
struct opencbm_plugin_s opencbm_plugin_t
holds all callbacks of the plugin
unsigned char CBMAPIDECL opencbm_plugin_parallel_burst_read_t(CBM_FILE HandleDevice)
@@@
opencbm_plugin_raw_write_t * opencbm_plugin_raw_write
DLL interface for accessing the driver.
opencbm_plugin_pp_write_t * opencbm_plugin_pp_write
opencbm_plugin_listen_t * opencbm_plugin_listen
int CBMAPIDECL opencbm_plugin_s2_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
write a block of data to the OpenCBM backend with protocol serial-2
opencbm_plugin_unlisten_t * opencbm_plugin_unlisten
opencbm_plugin_parallel_burst_read_t * opencbm_plugin_parallel_burst_read
opencbm_plugin_parallel_burst_write_track_t * opencbm_plugin_srq_burst_write_track
opencbm_plugin_tap_prepare_capture_t * opencbm_plugin_tap_prepare_capture
int CBMAPIDECL opencbm_plugin_get_eoi_t(CBM_FILE HandleDevice)
@@@
opencbm_plugin_parallel_burst_write_n_t * opencbm_plugin_parallel_burst_write_n
opencbm_plugin_tap_start_capture_t * opencbm_plugin_tap_start_capture
int CBMAPIDECL opencbm_plugin_pp_dc_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
write a block of data to the OpenCBM backend with protocol parallel/d64copy
opencbm_plugin_driver_open_t * opencbm_plugin_driver_open
int CBMAPIDECL opencbm_plugin_parallel_burst_read_track_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
@@@
int CBMAPIDECL opencbm_plugin_s3_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
write a block of data to the OpenCBM backend with protocol serial-3
opencbm_plugin_iec_poll_t * opencbm_plugin_iec_poll
int CBMAPIDECL opencbm_plugin_reset_t(CBM_FILE HandleDevice)
@@@
int CBMAPIDECL opencbm_plugin_tap_prepare_capture_t(CBM_FILE HandleDevice, int *Status)
@@@
opencbm_plugin_parallel_burst_write_n_t * opencbm_plugin_srq_burst_write_n
opencbm_plugin_close_t * opencbm_plugin_close
opencbm_plugin_parallel_burst_read_n_t * opencbm_plugin_parallel_burst_read_n
opencbm_plugin_open_t * opencbm_plugin_open
opencbm_plugin_get_driver_name_t * opencbm_plugin_get_driver_name
opencbm_plugin_reset_t * opencbm_plugin_reset
int CBMAPIDECL opencbm_plugin_parallel_burst_read_n_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
@@@
opencbm_plugin_tap_prepare_write_t * opencbm_plugin_tap_prepare_write
void CBMAPIDECL opencbm_plugin_uninit_t(void)
@@@
void CBMAPIDECL opencbm_plugin_parallel_burst_write_t(CBM_FILE HandleDevice, unsigned char Value)
@@@
int CBMAPIDECL opencbm_plugin_s1_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
write a block of data to the OpenCBM backend with protocol serial-1