File: serial.h

package info (click to toggle)
gngb 20060309-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,248 kB
  • ctags: 1,642
  • sloc: ansic: 11,009; sh: 2,915; makefile: 8
file content (46 lines) | stat: -rw-r--r-- 1,285 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*  gngb, a game boy color emulator
 *  Copyright (C) 2001 Peponas Thomas & Peponas Mathieu
 * 
 *  This program is free software; you can redistribute it and/or modify  
 *  it under the terms of the GNU General Public License as published by   
 *  the Free Software Foundation; either version 2 of the License, or    
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Library General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
 */

#ifndef SERIAL_H
#define SERIAL_H

#include "global.h"

struct {
  Sint16 cycle_todo;
  Uint16 p;
  Uint8 b;
  Uint8 byte_wait;
  Uint8 check;
  Uint8 wait;
  Uint8 ready2read;
}gbserial;

Sint16 serial_cycle_todo;
Sint8 gblisten;

void gbserial_init(int server_side,char *servername);
void gbserial_close(void);
void gbserial_send(Uint8 b);
Sint8 gbserial_receive(void);
char gbserial_check(void);
Uint8 gbserial_wait_data(void);

#endif