X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=minidol%2Flib%2Fports.h;fp=minidol%2Flib%2Fports.h;h=7561572567fb61c2da42e2be42ad53f47c45d02f;hb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;hp=0000000000000000000000000000000000000000;hpb=3e30b001296fb059cb070498bbe5d8e8834cd3e3;p=jump.git diff --git a/minidol/lib/ports.h b/minidol/lib/ports.h new file mode 100644 index 0000000..7561572 --- /dev/null +++ b/minidol/lib/ports.h @@ -0,0 +1,24 @@ +/* ports header */ +#ifndef _PORTS_H_ +#define _PORTS_H_ + +#include +#include + +typedef struct { + char name[PORTNAME_MAXLEN]; + int (*size) (void); /* size */ + int (*level)(void); /* how many bytes in buf? */ + int (*read) (void *buf, int len); + int (*write)(void *buf, int len); +} port_t; + +port_t* get_port(void* port); + +int size_shm (void *hwbuf); +int level_shm(void *hwbuf); +int read_shm (void *hwbuf, void *buf, int len); +int write_shm(void *hwbuf, void *buf, int len); + +#endif /* _PORTS_H_ */ +