source: projects/puncher/backend.dummy.c @ 8

Last change on this file since 8 was 8, checked in by sven, 11 years ago

Puncher subsystem development. The Linux and dummy backends should work right
now, the cli frontend should work, too. GTK frontend still in development.
Windows backend still... in preparation ;-)

-- Sven @ workstation

File size: 639 bytes
Line 
1/**
2 * This is a dummy backend for debugging and testing purpose.
3 * It will print out all it's punched values to STDERR.
4 *
5 *
6 *
7 **/
8
9#include <stdio.h>
10#include <stdlib.h>
11#include "backend.h"
12
13PuncherBackend* puncher_backend_new(int debug_flag) {
14    PuncherBackend *c = malloc(sizeof(PuncherBackend));
15    printf("[dummy backend] initialisation...\n");
16    return c;
17}
18
19int puncher_backend_write_byte(PuncherBackend* c, unsigned char byte) {
20    printf("[dummy backend] punching 0x%x\n", byte);
21    usleep (20*1000); // 20ms
22}
23
24int puncher_backend_destroy(PuncherBackend* c) {
25    printf("[dummy backend] finishing backend...\n");
26}
Note: See TracBrowser for help on using the repository browser.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License