Skip to content

Commit

Permalink
Merge pull request agalakhov#57 from mounaiban/0.1.4.1-RE2
Browse files Browse the repository at this point in the history
Code cleanups
  • Loading branch information
agalakhov authored Oct 8, 2022
2 parents 50aa43b + 7753fb3 commit 175f8ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/capt-command.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ enum capt_command {
CAPT_START_1 = 0xE0A3,
CAPT_START_3 = 0xE0A4,
CAPT_UPLOAD_2 = 0xE0A5,
CAPT_LBP3000_SETUP_0 = 0xE0A6,
CAPT_FIRE = 0xE0A7,
CAPT_JOB_END = 0xE0A9,
CAPT_LBP6000_SETUP_0 = 0xE0BA,
Expand Down
11 changes: 7 additions & 4 deletions src/prn_lbp2900.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ static const uint8_t lbp2900_gpio_init[] = {
0x00, 0x00, 0x00, 0x00,
};

static const uint8_t lbp3000_job_init[] = {
0x00, 0x00,
};

static const uint8_t lbp3010_gpio_blink[] = {
/* led */ 0x31, 0x00, 0x00, /* S6 */ 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, /* S7 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Expand All @@ -78,7 +82,7 @@ static const uint8_t lbp3010_gpio_init[] = {
0x00, 0x00, /* S7 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

static const uint8_t lbp6000_init[] = {
static const uint8_t lbp6000_job_init[] = {
0x01, 0x00,
};

Expand Down Expand Up @@ -162,8 +166,7 @@ static void lbp3000_job_prologue(struct printer_state_s *state)

/* There's also that command, that apparently does something, and does something,
* but it's there in the Wireshark logs. Response data == command data. */
uint8_t dummy[2] = {0, 0};
capt_sendrecv(0xE0A6, dummy, sizeof(dummy), NULL, 0);
capt_sendrecv(CAPT_LBP3000_SETUP_0, lbp3000_job_init, ARRAY_SIZE(lbp3000_job_init), NULL, 0);

lbp2900_wait_ready(state->ops);
}
Expand Down Expand Up @@ -208,7 +211,7 @@ static void lbp6000_job_prologue(struct printer_state_s *state)
capt_sendrecv(CAPT_GPIO, lbp3010_gpio_init, ARRAY_SIZE(lbp3010_gpio_init), NULL, 0);
lbp2900_wait_ready(state->ops);

capt_sendrecv(CAPT_LBP6000_SETUP_0, lbp6000_init, ARRAY_SIZE(lbp6000_init), NULL, 0);
capt_sendrecv(CAPT_LBP6000_SETUP_0, lbp6000_job_init, ARRAY_SIZE(lbp6000_job_init), NULL, 0);
lbp2900_wait_ready(state->ops);

send_job_start(1, 0);
Expand Down

0 comments on commit 175f8ff

Please sign in to comment.