summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-07-17 18:19:37 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-07-17 18:19:37 +0200
commit9ddcee7397d77919ba66b92baa846b32a538e91a (patch)
tree448165891c3a296536b52106a9b9d5506343cb81 /src
parent45cc082d46e743841eb329c03a8dc88ca433d98a (diff)
downloadlibufodecode-9ddcee7397d77919ba66b92baa846b32a538e91a.tar.gz
libufodecode-9ddcee7397d77919ba66b92baa846b32a538e91a.tar.bz2
libufodecode-9ddcee7397d77919ba66b92baa846b32a538e91a.tar.xz
libufodecode-9ddcee7397d77919ba66b92baa846b32a538e91a.zip
Fix bit order
Diffstat (limited to 'src')
-rw-r--r--src/ufodecode.c1
-rw-r--r--src/ufodecode.h44
2 files changed, 23 insertions, 22 deletions
diff --git a/src/ufodecode.c b/src/ufodecode.c
index dd32695..5597f7a 100644
--- a/src/ufodecode.c
+++ b/src/ufodecode.c
@@ -638,6 +638,7 @@ size_t ufo_decoder_decode_frame(UfoDecoder *decoder,
CHECK_VALUE(raw[pos++], 0x0AAAAAAA);
meta->status1.bits = raw[pos++];
+ printf("%x\n", raw[pos]);
meta->status2.bits = raw[pos++];
meta->status3.bits = raw[pos++];
pos++;
diff --git a/src/ufodecode.h b/src/ufodecode.h
index 38ea85a..7c2f098 100644
--- a/src/ufodecode.h
+++ b/src/ufodecode.h
@@ -6,37 +6,37 @@
typedef struct _UfoDecoder UfoDecoder;
typedef struct {
- unsigned dummy1:2;
- unsigned fsm_master_readout:4;
- unsigned dummy2:4;
- unsigned fsm_daq:4;
- unsigned pixel_full:1;
- unsigned control_lock:1;
unsigned data_lock:16;
+ unsigned control_lock:1;
+ unsigned pixel_full:1;
+ unsigned fsm_daq:4;
+ unsigned dummy2:4;
+ unsigned fsm_master_readout:4;
+ unsigned dummy1:2;
} UfoDecoderStatus1;
typedef struct {
- unsigned end_of_frames:1;
- unsigned busy_or:1;
- unsigned busy_ddr:1;
- unsigned busy_interl:1;
- unsigned error_status:4; /* What the heck? */
- unsigned data_fifo_read_count:10;
- unsigned data_fifo_full:1;
- unsigned data_fifo_empty:1;
- unsigned dummy:2;
- unsigned ddr_fifo_write_count:8;
- unsigned ddr_fifo_full:1;
unsigned ddr_fifo_empty:1;
+ unsigned ddr_fifo_full:1;
+ unsigned ddr_fifo_write_count:8;
+ unsigned dummy:2;
+ unsigned data_fifo_empty:1;
+ unsigned data_fifo_full:1;
+ unsigned data_fifo_read_count:10;
+ unsigned error_status:4; /* What the heck? */
+ unsigned busy_interl:1;
+ unsigned busy_ddr:1;
+ unsigned busy_or:1;
+ unsigned end_of_frames:1;
} UfoDecoderStatus2;
typedef struct {
- unsigned dummy:2;
- unsigned row_counter:10;
- unsigned pixel_counter:8;
- unsigned ddr_read:4;
- unsigned ddr_write:4;
unsigned ddr_arbiter:4;
+ unsigned ddr_write:4;
+ unsigned ddr_read:4;
+ unsigned pixel_counter:7;
+ unsigned row_counter:11;
+ unsigned dummy:2;
} UfoDecoderStatus3;
typedef struct {