diff --git a/backend_shinkos1245.c b/backend_shinkos1245.c index f9907c0..83dce04 100644 --- a/backend_shinkos1245.c +++ b/backend_shinkos1245.c @@ -135,7 +135,7 @@ struct shinkos1245_resp_status { uint8_t status1; uint32_t status2; /* BE */ uint8_t error; - } state; + } __attribute__((packed)) state; struct { uint32_t lifetime; /* BE */ uint32_t maint; /* BE */ @@ -145,13 +145,13 @@ struct shinkos1245_resp_status { uint8_t ver_boot; uint8_t ver_ctrl; uint8_t control_flag; // 0x00 == epson, 0x01 == cypress - } counters; + } __attribute__((packed)) counters; struct { uint16_t main_boot; uint16_t main_control; uint16_t dsp_boot; uint16_t dsp_control; - } versions; + } __attribute__((packed)) versions; struct { uint8_t bank1_id; uint8_t bank2_id; @@ -161,7 +161,7 @@ struct shinkos1245_resp_status { uint16_t bank2_remain; /* BE */ uint16_t bank2_complete; /* BE */ uint16_t bank2_spec; /* BE */ - } counters2; + } __attribute__((packed)) counters2; uint8_t curve_status; } __attribute__((packed)); @@ -1639,7 +1639,7 @@ static int shinkos1245_query_serno(struct libusb_device_handle *dev, uint8_t end struct dyesub_backend shinkos1245_backend = { .name = "Shinko/Sinfonia CHC-S1245", - .version = "0.11WIP", + .version = "0.12WIP", .uri_prefix = "shinkos1245", .cmdline_usage = shinkos1245_cmdline, .cmdline_arg = shinkos1245_cmdline_arg,