Commit dff463fd authored by Wesley W. Terpstra's avatar Wesley W. Terpstra

Debug helpers

parent 8fe0b307
......@@ -8,6 +8,10 @@
#include <sys/types.h>
#include <fcntl.h>
#include <stdio.h>
// #define DEBUG_RAWRABBIT
struct rr_iocmd {
uint32_t address;
uint32_t datasize;
......@@ -77,9 +81,15 @@ void RawRabbit::execute() {
iocmd.data32 = o.data;
if (o.write) {
#ifdef DEBUG_RAWRABBIT
fprintf(stderr, "Send: %d, %x\n", iocmd.data32 & 3, iocmd.data32 >> 3);
#endif
ioctl(fd, RR_WRITE, &iocmd);
} else {
ioctl(fd, RR_READ, &iocmd);
#ifdef DEBUG_RAWRABBIT
fprintf(stderr, "Recv: %d, %x\n", iocmd.data32 & 3, iocmd.data32 >> 3);
#endif
}
o.data = iocmd.data32;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment