Update copyright notices
[litex.git] / vpi / ipc.h
1 /*
2 * Copyright (C) 2012 Vermeer Manufacturing Co.
3 * License: GPLv3 with additional permissions (see README).
4 */
5
6 #ifndef __IPC_H
7 #define __IPC_H
8
9 struct ipc_softc;
10
11 typedef int(*go_handler)(void *);
12 typedef int(*write_handler)(char *, int, int, const unsigned char *, void *);
13 typedef int(*read_handler)(char *, int, void *);
14
15 struct ipc_softc *ipc_connect(const char *sockaddr,
16 go_handler h_go, write_handler h_write, read_handler h_read, void *user);
17 void ipc_destroy(struct ipc_softc *sc);
18
19 int ipc_receive(struct ipc_softc *sc);
20
21 int ipc_tick(struct ipc_softc *sc);
22 int ipc_read_reply(struct ipc_softc *sc, int nchunks, const unsigned char *value);
23
24 #endif /* __IPC_H */