Commit 5d8c7d37 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Corrected labcomm_pack32 to use current labcomm_writer interface.

parent 4975adc7
......@@ -346,11 +346,36 @@ static inline void labcomm_pack32(labcomm_writer_t *w, unsigned int data)
w->write(w, labcomm_writer_continue, n);
}
switch (n) {
case 5: w->data[w->pos++] = tag; tag = 0;
case 4: w->data[w->pos++] = tmp[0] | tag; tag = 0;
case 3: w->data[w->pos++] = tmp[1] | tag; tag = 0;
case 2: w->data[w->pos++] = tmp[2] | tag; tag = 0;
case 1: w->data[w->pos++] = tmp[3] | tag;
case 5: {
if (w->pos >= w->count) {
w->write(w, labcomm_writer_continue);
}
w->data[w->pos++] = tag; tag = 0;
}
case 4: {
if (w->pos >= w->count) {
w->write(w, labcomm_writer_continue);
}
w->data[w->pos++] = tmp[0] | tag; tag = 0;
}
case 3: {
if (w->pos >= w->count) {
w->write(w, labcomm_writer_continue);
}
w->data[w->pos++] = tmp[1] | tag; tag = 0;
}
case 2: {
if (w->pos >= w->count) {
w->write(w, labcomm_writer_continue);
}
w->data[w->pos++] = tmp[2] | tag; tag = 0;
}
case 1: {
if (w->pos >= w->count) {
w->write(w, labcomm_writer_continue);
}
w->data[w->pos++] = tmp[3] | tag;
}
}
}
......
Supports Markdown
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