From aaa213ed78a0593db34c5f706ec3c6dd98ac95cf Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 3 Feb 2024 12:18:07 +0100 Subject: [PATCH] write one byte by read --- src/kds_s2000w_net.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index dabebc2..d3f4c27 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -152,7 +152,6 @@ const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor( SANE_Status _sane_kds_s2000w_net_control_option(SANE_Handle handle, SANE_Int option, SANE_Action action, void* value, SANE_Int* info) { - if (action == SANE_ACTION_GET_VALUE) kds_s2000w_handler_get_option(option, value); @@ -170,10 +169,10 @@ SANE_Status _sane_kds_s2000w_net_get_parameters(SANE_Handle handle, { params->format = SANE_FRAME_GRAY; params->last_frame = SANE_TRUE; - params->bytes_per_line = 0; - params->pixels_per_line = 0; - params->lines = 0; - params->depth = 0; + params->bytes_per_line = 1024; + params->pixels_per_line = 1; + params->lines = 1; + params->depth = 1; return SANE_STATUS_GOOD; } @@ -186,6 +185,9 @@ SANE_Status _sane_kds_s2000w_net_start(SANE_Handle handle) SANE_Status _sane_kds_s2000w_net_read(SANE_Handle handle, SANE_Byte* data, SANE_Int max_length, SANE_Int* length) { + *data = 1; + *length = 1; + return SANE_STATUS_GOOD; } -- 2.39.5