forked from brianwiddas/gpiodcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dcc.h
67 lines (46 loc) · 1.04 KB
/
dcc.h
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef DCC_H
#define DCC_H
#if 0
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdarg.h>
/* strerror */
#include <string.h>
/* Threads */
#include <pthread.h>
/* mmap() */
#include <sys/mman.h>
/* open() */
#include <sys/stat.h>
#include <fcntl.h>
/* Timers */
#include <signal.h>
#include <time.h>
/* EX_OSERR */
#include <sysexits.h>
/* errno & EBUSY */
#include <errno.h>
/* Scheduler */
#include <sched.h>
#endif
// pthread_t dccthreadid;
struct dccmessage
{
unsigned int length;
unsigned char data[10]; /* How long is the longest packet? */
struct dccmessage *next; /* Linked list */
};
// struct dccmessage *messagelist;
//pthread_mutex_t dccmutex;
/* Debug */
extern void debug_printlist(void);
/* Add or update an instruction
* Create a new instruction in memory if one not supplied
*/
extern struct dccmessage *add_update(struct dccmessage *message,
unsigned int bytes, ...);
extern void delete(struct dccmessage *message);
extern void quit(int data);
extern void setup_dcc(void);
#endif /* DCC_H */