-
Notifications
You must be signed in to change notification settings - Fork 128
Expand file tree
/
Copy pathremote_bitbang.h
More file actions
52 lines (37 loc) · 1.15 KB
/
remote_bitbang.h
File metadata and controls
52 lines (37 loc) · 1.15 KB
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
47
48
49
50
51
52
// See LICENSE.Berkeley for license details.
#ifndef REMOTE_BITBANG_H
#define REMOTE_BITBANG_H
#include <stdint.h>
#include <sys/types.h>
#define VERBOSE 0
extern int rbs_err;
extern unsigned char tck;
extern unsigned char tms;
extern unsigned char tdi;
extern unsigned char trstn;
extern unsigned char tdo;
extern unsigned char quit;
extern int socket_fd;
extern int client_fd;
extern const ssize_t buf_size;
extern char recv_buf[];
extern ssize_t recv_start, recv_end;
// Create a new server, listening for connections from localhost on the given
// port.
int rbs_init(uint16_t port);
// Do a bit of work.
void rbs_tick(unsigned char *jtag_tck, unsigned char *jtag_tms,
unsigned char *jtag_tdi, unsigned char *jtag_trstn,
unsigned char jtag_tdo);
unsigned char rbs_done();
int rbs_exit_code();
// Check for a client connecting, and accept if there is one.
void rbs_accept();
// Execute any commands the client has for us.
// But we only execute 1 because we need time for the
// simulation to run.
void rbs_execute_command();
// Reset. Currently does nothing.
void rbs_reset();
void rbs_set_pins(char _tck, char _tms, char _tdi);
#endif